CVE-2026-143108: fs/adfs: bound directory entry name length in adfs_fplus_getnext()
In the Linux kernel, the following vulnerability has been resolved:
fs/adfs: bound directory entry name length in adfsfplusgetnext()
adfsfplusgetnext() reads the per-entry name length bigdirobnamelen straight from the on-disk big directory and passes it to adfsdircopyfrom() as the copy length into obj->name[], a fixed ADFSMAXNAMELEN (260) byte buffer. adfsdircopyfrom() only bounds the copy against the number of directory buffers, not the size of the destination, so a crafted image with bigdirobnamelen larger than the buffer overflows the stack-allocated objectinfo::name that adfsfplusiterate() passes in.
adfsobjectfixup() may additionally append a four byte ",xyz" filetype suffix, so the accepted length must also leave room for that.
The old-style directory parser (dirf.c) already clamps names to ADFSFNAMELEN, and adfsfplusvalidateheader() validates the header name fields, but the per-entry name length in the big directory format was never checked. Reject over-long entries, using -EIO as elsewhere in this file for a corrupt big directory.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the Linux kernel ADFS big-directory parser, make adfs_fplus_getnext() reject over-long entry names before copying them into obj->name[], leaving room for the four-byte filetype suffix, and return -EIO.
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems that process a crafted ADFS “big directory” filesystem image are exposed. The vulnerable path is the ADFS F+ directory parser, not the old-style ADFS directory parser.
What does an attacker need to exploit it?
An attacker needs to provide or cause the system to read a malicious ADFS big-directory image containing a directory entry whose on-disk name-length field exceeds the destination buffer capacity. The overlong value is used as a copy length into a fixed 260-byte stack buffer.
Are normal ADFS directory names affected?
The issue concerns unchecked per-entry name lengths in the big-directory format. Header name fields are already validated, and the old-style directory parser already clamps name lengths.
How can the issue be mitigated before updating?
Avoid mounting, browsing, or otherwise processing untrusted ADFS filesystem images, particularly images using the big-directory format. Treat malformed ADFS media as untrusted until the kernel includes the change that rejects overlong entries with an I/O error.