Linux 7.5 will let you disable /proc/kcore at boot without rebuilding the kernel
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.
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:
# /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:
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
You are reading the Linux section.