HIGH
fuse Dirent Overflow
CVE-2026-31694
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.1MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: fuse: reject oversized dirents in page cache fuse_add_dirent_to_cache() computes a serialized dirent size from the server-controlled namelen field and copies the dirent into a single page-cache page. The existing logic only checks whether the dirent fits in the remaining space of the current page and advances to a fresh page if not. It never checks whether the dirent itself exceeds PAGE_SIZE. As a result, a malicious FUSE server can return a dirent with namelen=4095, producing a serialized record size of 4120 bytes. On 4 KiB page systems this causes memcpy() to overflow the cache page by 24 bytes into the following kernel page. Reject dirents that cannot fit in a single page before copying them into the readdir cache.
02KernelScan AI Analysis
Risk summary
A malicious FUSE server can cause a limited out-of-bounds write past a page-cache page by returning directory entries with oversized names, leading to kernel memory corruption and potential system panic. This affects systems that mount untrusted FUSE filesystems or allow unprivileged users to create FUSE mounts.
Vulnerability analysis
The vulnerability occurs in fuse_add_dirent_to_cache() where the kernel computes a serialized directory entry size based on a server-controlled namelen field without validating that the resulting record fits within a single page. A malicious FUSE server can return a dirent with a large namelen, causing memcpy() to write beyond the allocated page-cache page into the adjacent kernel page. The fix adds a bounds check to reject dirents exceeding PAGE_SIZE before copying them into the readdir cache.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.10 | 5.10.258 | 3059f9abe7f1 |
| 5.15 | 5.15.209 | 1d4a517fa904 |
| 6.1 | 6.1.175 | 038e61812fa5 |
| 6.12 | 6.12.84 | 45c05af36311 |
| 6.18 | 6.18.25 | 7de93abfaae1 |
| 6.6 | 6.6.136 | d23ad78bfd20 |
| 7.0 | 7.0.2 | 474ce83c96a5 |
| mainline | 7.1-rc1 | 51a8de6c50bf |