> ## Content Index
> Fetch the complete content index at: https://ettayeb.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# Linux 7.5 will let you disable /proc/kcore at boot without rebuilding the kernel
- URL: https://ettayeb.fr/en/linux/linux-7-5-proc-kcore-boot-parameter-2026-en/
- Published: 2026-11-21T00:00:00.000Z
- Updated: 2026-11-21T00:00:00.000Z
- Description: A patch by Chris Down, an engineer at Meta, adds a kcore= boot parameter that disables /proc/kcore — the virtual file exposing all of physical memory and the kernel’s address space — without a recompile. Expected in Linux 7.5, it closes a gap that CONFIG_STRICT_DEVMEM left open on hardened hosts.
- Author: Walid Ettayeb
- Tags: Linux, kernel, kcore, Security, hardening, #en, #Import 2026-11-23 14:52

**November 19, 2026.** **Phoronix** reports a patch by **Chris Down**, an engineer at **Meta**, adding a **kcore=** boot parameter to the kernel. **November 18, 2026.** The patch lands in the **vfs-7.5.procfs** branch of **vfs.git**. **In about a month.** It will be submitted for the **Linux 7.5** merge window. Why it matters: a single boot option now closes a kernel-memory read channel that conventional hardening left wide open.

## /proc/kcore: all of memory behind one file

**/proc/kcore** is one of those virtual files you forget exists until the day you grasp what it holds. It exposes, in **ELF core dump** format, **the entirety of physical memory** and the **kernel’s virtual address space**. In plain terms: anyone who can read it can read everything the kernel has in memory — keys, caches, network buffers, process secrets.

Access is, in theory, already locked down. Only **root** or a process holding the **CAP\_SYS\_RAWIO** capability can open the file. That is a real restriction, but it rests on a fragile assumption: that **CAP\_SYS\_RAWIO** is held only by trusted processes. In practice the capability is often granted to tools that need direct hardware access — without any intention of handing them a full read of RAM.

**Chris Down’s** patch does not change the file itself: it adds an **upstream valve**. With the **kcore=** parameter, an administrator can forbid access to **/proc/kcore** at boot, leaving the rest of the kernel untouched.

## The real gap: CAP\_SYS\_RAWIO becomes a master key

The patch message is worth reading in full, because it frames the problem better than any summary. “/proc/kcore lets any process with **CAP\_SYS\_RAWIO** read all of kernel memory. That’s a pretty large read primitive for anyone who obtains **CAP\_SYS\_RAWIO** (and it also gives away the **KASLR** layout).”

Two points deserve attention. The first is the **KASLR leak**: by reading **/proc/kcore**, an attacker who already has root can determine the kernel’s real address, defeating address randomization and easing the exploitation of a later flaw. The second is the **capability asymmetry**: a process may legitimately hold **CAP\_SYS\_RAWIO** to touch hardware without holding **CAP\_BPF** or **CAP\_PERFMON**. Today that asymmetry protects nothing — **/proc/kcore** hands it RAM anyway.

Chris Down notes that **CONFIG\_STRICT\_DEVMEM** already closed **/dev/mem** for the same reason, but **/proc/kcore** bypasses that protection by offering “the same capability to do general purpose RAM reading anyway.” Hardening was incomplete: the door was locked, but the window behind it stayed open.

## kcore=: the end of the double kernel

Until now, disabling **/proc/kcore** on a hardened host was a hack. Three options existed, none of them satisfying.

**lockdown=confidentiality** does block the read, but at a heavy price: it also disables **kprobes** and **bpf\_probe\_read\_kernel**, two mechanisms that observability and debugging depend on. A custom **LSM** works but demands code to maintain. The third option, the most common in demanding environments, was to **build two kernels**: one with **CONFIG\_PROC\_KCORE=y** for debugging machines, another with **CONFIG\_PROC\_KCORE=n** for hardened ones. Two images, two maintenance chains, two risk surfaces.

**kcore=** removes that trade-off. One kernel image, one boot-time choice: `kcore=off` disables the file, omitting the parameter leaves it on. As the author puts it, “on the majority of hosts we do want it on for things like **drgn**/crash” — the live kernel debuggers that read **/proc/kcore**. The new option preserves that use case while letting you turn it off where it has no business being on.

The default stays **enabled**, so nothing breaks: a kernel built with **CONFIG\_PROC\_KCORE** behaves exactly as before until the administrator adds **kcore=off**.

## What it means for an operator

For an **SRE** or **security engineer** hardening exposed servers, this closes a concrete blind spot. A production server almost never needs **/proc/kcore** to be readable: live debugging happens on a dedicated box, not on the one serving traffic. Turning it off strips a full-memory read primitive from any process that gains **CAP\_SYS\_RAWIO** through a privilege escalation.

The setup is trivial, which is exactly what makes it a sound hardening reflex:

```bash
# /etc/default/grub — add the option, then regenerate the configuration
GRUB_CMDLINE_LINUX="quiet splash kcore=off"
sudo update-grub

```

After a reboot, confirm the access is gone:

```bash
sudo cat /proc/kcore   # should fail with an open error

```

A process without the capability could never read it in the first place; the option removes the read even for **root**, which is the point — an attacker who escalates to root no longer gains, in passing, all of RAM and the **KASLR** layout.

Be honest about the scope, though. **kcore=** does not protect against an attacker who already holds **CAP\_BPF** or **CAP\_PERFMON** — those capabilities carry their own memory-read primitives. It closes one channel, the widest and most obvious, and it does so without giving up debugging tools elsewhere. This is **defense in depth**, not an absolute boundary.

## The verdict

**If you harden Linux hosts in production: prepare `kcore=off` as soon as Linux 7.5 lands.** Add it to your base images for servers that are not meant to be debugged live — web, API, databases, compute nodes — and leave it off on diagnostic and forensics boxes where **drgn** and **crash** need it. It is a clean security win for the cost of one line in the boot configuration.

**If you maintain kernel images for multiple purposes: your double compilation is over.** Move to a single image with **CONFIG\_PROC\_KCORE=y**, and switch access per host via **kcore=**. You shrink your maintenance surface while keeping exactly the same guarantees. The patch’s lesson reaches beyond **/proc/kcore**: the kernel’s memory-read primitives are converging toward **least privilege**, one capability at a time — and **kcore=** is the lock that **CONFIG\_STRICT\_DEVMEM** was missing.

## Références

- [Phoronix — Linux 7.5 To Optionally Block /proc/kcore Access For Better Security (November 19, 2026)](https://www.phoronix.com/news/Linux-7.5-Restrict-proc-kcore?ref=ettayeb.fr)
- [kernel.org — kcore= commit in the vfs-7.5.procfs branch (Chris Down)](https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git/commit/?h=vfs-7.5.procfs&id=9cf8c00eb41ff7cbedf3a3ee9ba77fd49d7dfb06&ref=ettayeb.fr)