CVE-2026-97437: ntfs3: fix out-of-bounds read in ntfs_dir_emit() and hdr_find_e()

Published Sep 24, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ntfs3: fix out-of-bounds read in ntfsdiremit() and hdrfinde()

The bounds check in ntfsdiremit() compares fname->namelen (a character count) against e->size (a byte count) without accounting for the 2-byte-per-character UTF-16LE encoding or the ATTRFILENAME header size:

if (fname->namelen + sizeof(struct NTFSDE) > le16tocpu(e->size))

This computes: namelen + 16 > esize

The correct check must account for the ATTRFILENAME header (66 bytes before the name) and the UTF-16LE character size (2 bytes each):

sizeof(NTFSDE) + offsetof(ATTRFILENAME, name) + namelen sizeof(short) > esize

Which computes: 16 + 66 + namelen 2 > esize

The correct calculation already exists as fnamefullsize() in ntfs.h and is used in cmpfnames(), namei.c, and fslog.c, but was not used in the readdir path.

A crafted NTFS image with an index entry containing a small e->size but large fname->namelen bypasses the current check, causing ntfsutf16tonls() to read past the entry boundary.

Additionally, add a keysize validation in hdrfinde() to ensure the declared keysize does not exceed the available entry data, preventing comparison functions from reading past entry boundaries on the lookup path.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In ntfs_dir_emit(), validate the filename entry using fname_full_size(), accounting for the ATTR_FILE_NAME header and UTF-16LE character size: ensure the calculated filename size (16 + 66 + name_len * 2) does not exceed e->size.

  2. Compensating control

    In hdr_find_e(), add key_size validation to ensure the declared key_size does not exceed the available entry data before processing the entry.

Event History

Sep 24, 2026
CVE Published
via MITRE·04:03 PM
Data Sourced
via MITRE·04:03 PM
Description
Data Sourced
via NVD·05:17 PM
Description

Frequently Asked Questions

1

What does an attacker need to provide to trigger the vulnerable path?

The attacker needs a crafted NTFS image containing an index entry whose declared entry size is small while its file-name length is large. This can bypass the incorrect size check and cause ntfs_utf16_to_nls() to read past the entry boundary.

2

When is the malformed index entry processed?

The affected validation in ntfs_dir_emit() is in the readdir path, where directory entries are emitted. The additional hdr_find_e() validation concerns declared key sizes that exceed available entry data.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203