ntfs: sanitize MFT references returned from ntfs_lookup_inode_by_name()
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ntfs: sanitize MFT references returned from ntfs_lookup_inode_by_name()
ntfs_lookup_inode_by_name() returns MFT references read from directory index entries on disk. These values are untrusted, but the function can currently return an error-marked MFT reference to its callers without validating it.
Callers later decode lookup failures with MREF_ERR(). A crafted NTFS image can set the MREF error bit while leaving the low bits as an arbitrary value, causing callers to consume a bogus pseudo-errno instead of treating the lookup result as corrupted on-disk metadata.
Fix this at the source by normalizing every error-marked MFT reference returned from ntfs_lookup_inode_by_name() to ERR_MREF(-EIO). Apply this to all four directory lookup return paths so every caller gets a validated result without needing additional checks or an API change.
This keeps the sanitization in the common lookup helper, which is cleaner than duplicating validation in each caller.
From the CVE record · Linux
The Linux kernel’s NTFS lookup helper can return unvalidated MFT references from directory index entries. When the kernel processes a crafted NTFS image, callers can interpret a bogus value as an error code instead of recognizing corrupted on-disk metadata. The input does not specify authentication requirements or whether user interaction is needed.
Engineers running Linux systems that process NTFS images should check their kernel versions; affected versions are not specified.