Skip to content
Medium 4.4

fs/ntfs3: fix integer overflow in find_log_rec() causing OOB read

CVE-2026-138947 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 5.15.0, < 5.15.226→ 5.15.226
≥ 5.16.0, < 6.1.193→ 6.1.193
≥ 6.2.0, < 6.6.163→ 6.6.163
≥ 6.7.0, < 6.12.117→ 6.12.117
≥ 6.13.0, < 6.18.63→ 6.18.63
≥ 6.19.0, < 7.3.4→ 7.3.4

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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

fs/ntfs3: fix integer overflow in find_log_rec() causing OOB read

find_log_rec() validates the on-disk LFS_RECORD_HDR.client_data_len
field (len, a raw u32 read straight from a mounted $LogFile page)
against the log's total available space:

len = le32_to_cpu(rh->client_data_len);
rec_len = len + log->record_header_len;
if (rec_len >= log->total_avail)
        return -EINVAL;

The addition is unchecked. For len in [0xffffffd0, 0xffffffff] (i.e.
log->record_header_len away from UINT_MAX), rec_len wraps to a small
u32 value that trivially clears the rec_len >= log->total_avail
guard, so a record whose declared length is actually ~4 GiB is
reported as valid and in-page.

Because find_log_rec() wrongly accepts the record, its caller
read_log_rec_lcb() hands it back to log_replay() as good. On the
transaction-table replay leg, log_replay() re-derives the record
length directly from the same raw, still-unclamped client_data_len
field and uses it to size the restart-table blob:

rec_len = le32_to_cpu(frh->client_data_len);   /* ~0xffffffff */
...
t16 = le16_to_cpu(lrh->redo_off);
rt  = Add2Ptr(lrh, t16);
t32 = rec_len - t16;                            /* still ~4 GiB */
if (!check_rstbl(rt, t32))
        return -EINVAL;

check_rstbl()'s own bytes < ts bounds guard is defeated because the
caller-supplied bytes (t32) is itself the poisoned ~4 GiB value, so
the gu…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details