fuse: reject oversized dirents in page cache
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.257.0.27.1In 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.
From the CVE record · Linux
The Linux kernel’s FUSE readdir cache does not reject directory entries too large to fit in one page. A malicious FUSE server can supply an oversized entry that causes a 24-byte overflow into the next kernel page on systems with 4 KiB pages.
Operators running Linux kernels with FUSE support on systems with 4 KiB pages should check whether their kernel is affected; affected versions were not provided.