CVE-2026-43408: ceph: add a bunch of missing ceph_path_info initializers
In the Linux kernel, the following vulnerability has been resolved:
ceph: add a bunch of missing cephpathinfo initializers
cephmdscbuildpath() must be called with a zero-initialized cephpathinfo parameter, or else the following cephmdscfreepathinfo() may crash.
Example crash (on Linux 6.18.12):
virttocache: Object is not a Slab page! WARNING: CPU: 184 PID: 2871736 at mm/slub.c:6732 kmemcachefree+0x316/0x400 [...] Call Trace: [...] cephopen+0x13d/0x3e0 dodentryopen+0x134/0x480 vfsopen+0x2a/0xe0 pathopenat+0x9a3/0x1160 [...] cachefromobj: Wrong slab cache. namescache but object is from cephinodeinfo WARNING: CPU: 184 PID: 2871736 at mm/slub.c:6746 kmemcachefree+0x2dd/0x400 [...] kernel BUG at mm/slub.c:634! Oops: invalid opcode: 0000 [#1] SMP NOPTI RIP: 0010:slabfree+0x1a4/0x350
Some of the cephmdscbuildpath() callers had initializers, but others had not, even though they were all added by commit 15f519e9f883 ("ceph: fix race condition validating rparent before applying state"). The ones without initializer are suspectible to random crashes. (I can imagine it could even be possible to exploit this bug to elevate privileges.)
Unfortunately, these Ceph functions are undocumented and its semantics can only be derived from the code. I see that cephmdscbuildpath() initializes the structure only on success, but not on error.
Calling cephmdscfreepathinfo() after a failed cephmdscbuildpath() call does not even make sense, but that's what all callers do, and for it to be safe, the structure must be zero-initialized. The least intrusive approach to fix this is therefore to add initializers everywhere.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ceph (Linux kernel ceph mdsc path_info handling)to a version that resolves this vulnerability.Patch 15f519e9f883 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch ceph: add a bunch of missing ceph_path_info initializers - Compensating control
Ensure any affected kernel build includes the Ceph fix for ceph_mdsc_free_path_info()/ceph_mdsc_build_path() path_info initialization (race/invalid slab free) so that ceph_path_info is zero-initialized or fully initialized on all success/error paths.
Event History
Frequently Asked Questions
What access does an attacker need to trigger this issue?
The reported CVSS vector requires local access and low privileges, with no user interaction required. The crash example occurs during a Ceph file open operation.
What are the likely consequences on an affected system?
Affected callers can pass uninitialized ceph_path_info data to ceph_mdsc_build_path(), causing ceph_mdsc_free_path_info() to free invalid memory. The reported outcome includes slab-cache warnings, a kernel BUG, and a system crash; the report also notes that privilege escalation may be possible.
How can administrators recognize that this vulnerability may already be occurring?
Kernel logs may show messages such as "virt_to_cache: Object is not a Slab page!", "cache_from_obj: Wrong slab cache", or a kernel BUG in __slab_free. The example call trace includes ceph_open, do_dentry_open, and path_openat.
Which code paths are affected?
The issue affects ceph_mdsc_build_path() callers that do not zero-initialize their ceph_path_info parameter before the subsequent ceph_mdsc_free_path_info() call. Some callers already had initializers, while others did not.