HIGH Introduced in 2.6.12
hfsplus ThreadRecord OOB
CVE-2026-93095
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.4MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: hfsplus: validate thread record before delete key rebuild hfsplus_delete_cat() is called with str == NULL when the last open reference to an unlinked HFS+ hardlink backing inode is closed. In that case, the function finds the catalog thread by CNID and rebuilds the catalog key from thread.nodeName. That reconstruction path reads thread.nodeName.length directly from the catalog B-tree into fd.search_key and then copies length * 2 bytes into fd.search_key->cat.name.unicode. It does not first check that the found record is a thread record or that its size matches the thread name. A corrupted image can therefore provide an oversized thread name length and make hfs_bnode_read() write past the catalog search-key allocation. Read the CNID record through hfsplus_brec_read_cat(), which bounds the record read to sizeof(hfsplus_cat_entry) and verifies that a thread record's size exactly matches nodeName.length. Together, these checks ensure an accepted thread name fits HFSPLUS_MAX_STRLEN. Reject non-thread records before building the delete key from the validated thread name. Share the thread-record-type helper between hfsplus_find_cat() and hfsplus_delete_cat().
02KernelScan AI Analysis
Risk summary
A corrupted HFS+ filesystem image can trigger an out-of-bounds heap write in the kernel's catalog deletion path when the image is mounted. The vulnerability requires root privileges (CAP_SYS_ADMIN) to mount the crafted image or physical access to insert removable media. Successful exploitation could lead to kernel memory corruption, potentially resulting in arbitrary code execution or a system crash.
Vulnerability analysis
When the last open reference to an unlinked HFS+ hardlink backing inode is closed, the kernel rebuilds a catalog deletion key from a thread record found in the catalog B-tree. The original code reads the thread name length directly from on-disk B-tree data and copies that many bytes into a fixed-size search-key buffer without first verifying that the record is actually a thread record or that the name length is within bounds. A corrupted filesystem image can supply an oversized length value, causing the kernel to write past the end of the allocated search-key buffer on the heap. The fix routes the record read through a helper that bounds the read to a fixed-size catalog entry structure, validates the record type, and confirms the thread name length before reconstructing the deletion key. This vulnerability is reachable by mounting a crafted HFS+ filesystem image, which requires CAP_SYS_ADMIN in the init namespace or physical access to insert removable media such as a USB drive or SD card.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 2.6.12 | 5.10.270 | 33cda0036bc6 |
| 5.15 | 2.6.12 | 5.15.221 | b9729c51a8b6 |
| 6.1 | 2.6.12 | 6.1.188 | af48abc1b00d |
| 6.18 | 2.6.12 | 6.18.52 | e31985c67ba0 |
| 7.2 | 2.6.12 | 7.2.6 | 473ea7aa3561 |
| 6.12 | 2.6.12 | 6.12.110 | 7898beee166c |
| 6.6 | 2.6.12 | 6.6.157 | e20f3b749ad2 |
| mainline | 2.6.12 | 7.3-rc1 | e2ea5cac61ac |