HIGH Introduced in 6.14
cachefiles Coherency OOB
CVE-2026-98117
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI3.4LOW
01Description
In the Linux kernel, the following vulnerability has been resolved: cachefiles: Fix potential UAF/KASAN warning Currently, trace_cachefiles_coherency() is being passed a pointer to a __be64 lain over the coherency data in struct cachefiles_xattr so that it can display the first 8 bytes. However, the data is of variable length and could even be 0 bytes. This could lead to a UAF or KASAN warning. Fix this by making sure the buffer has room for at least 8 bytes and that those 8 bytes are pre-cleared. Further, those bytes are not 8-byte aligned, so fix the tracepoint to extract the data as four 2-byte words (they are 2-byte aligned) and reassemble the __be64. The compiler will convert this into a single 8-byte load where the CPU supports it.
02KernelScan AI Analysis
Risk summary
A tracepoint in the cachefiles filesystem cache reads 8 bytes from a variable-length buffer that may contain fewer than 8 bytes, causing a heap out-of-bounds read. The leaked bytes are logged to the kernel trace buffer. This requires cachefiles to be configured (a root-only operation) and triggers during normal caching operations when the cached filesystem's auxiliary data is shorter than 8 bytes. Impact is limited to a small information disclosure and, with KASAN enabled, a potential kernel warning or panic.
Vulnerability analysis
A coherency tracing function in the cachefiles subsystem reads eight bytes from a variable-length auxiliary-data buffer that could be as short as zero bytes, reading past the end of the allocated heap object. The fix guarantees the buffer always has room for at least eight bytes, pre-clears those bytes so no stale data is logged, and rewrites the tracepoint to extract the data through properly aligned 2-byte loads instead of an unaligned 8-byte dereference. The vulnerable path is reached only when cachefiles is active — which requires root to configure the cache directory — and fires during set-xattr or coherency-check operations on cached objects whose auxiliary data is shorter than eight bytes.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.14 | 6.18.53 | 68d459e6e609 |
| 7.2 | 6.14 | 7.2.7 | 93488ea378b4 |
| mainline | 6.14 | 7.3 | a67632c8c268 |