Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-138947

published

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

Published
30 Nov 2026, 13:26:27 UTC
Updated
30 Nov 2026, 13:26:27 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxb46acd6a6a627d876898e1c84d3f84902264b445 to < 03f222fbeb55b5b3b95dd70dd1cdcb02895a7d86 · b46acd6a6a627d876898e1c84d3f84902264b445 to < fb9dd65b3bd11c3e26920e2e9ec1fd8fe63d3ba3 · b46acd6a6a627d876898e1c84d3f84902264b445 to < 1921d296d3e79e188bed46592e0c84df6461cb99 · b46acd6a6a627d876898e1c84d3f84902264b445 to < 89579415a00b776698334586e6ecf01efd00049c · b46acd6a6a627d876898e1c84d3f84902264b445 to < 5352e7447219bf7777aa0cffe0752f655d9a0060 · b46acd6a6a627d876898e1c84d3f84902264b445 to < 3d5dbe7706a9d58b8356731aaafefb8053711b27 · b46acd6a6a627d876898e1c84d3f84902264b445 to < e2fcb0040b0b4097b2e97f3fbe77d3b66df9e816 · Other versions: unaffected Affected Not stated Linux
Linux — Linux5.15 (affected) · 0 to < 5.15 (unaffected · semver) · 5.15.226 through 5.15.* (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.117 through 6.12.* (unaffected · semver) · 6.18.63 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Pending Fix; Not Affected Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Pending Fix Not stated Amazon Linux assessment

Description

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 guard can never trigger. The subsequent entry-validation loop then walks `rt->used` (also attacker-controlled) entries of sizeof(struct RESTART_TABLE) == 0x18 bytes each straight past the end of the kmalloc(log->page_size) log-page buffer allocated in read_log_page(), producing an out-of-bounds read that is reachable simply by mounting a crafted $LogFile (no genuine dirty-page / crash-recovery state is required). Confirmed via KASAN as a slab-out-of-bounds read in check_rstbl(), called from log_replay() -> ntfs_loadlog_and_replay() -> ntfs_fill_super() -> mount(2). Fix the root cause instead of hardening every downstream consumer of the poisoned length: make the addition in find_log_rec() overflow-safe with check_add_overflow(), mirroring the pattern fs/ntfs3/run.c already uses to validate other attacker-controlled on-disk length/offset arithmetic decoded from MAPPING_PAIRS runs, e.g.: if (check_add_overflow(vcn64, len, &next_vcn)) return -EINVAL; ... if (check_add_overflow(lcn, len, &lcn_end)) return -EINVAL; (fs/ntfs3/run.c, run_unpack()). With the overflow rejected instead of silently wrapped, `rec_len` is only ever a true, non-wrapped sum, so the existing `rec_len >= log->total_avail` check now correctly rejects any oversized record up front. log_replay()'s transaction-table leg then never gets a chance to re-read the poisoned client_data_len, and check_rstbl() is never invoked with an attacker-inflated `bytes` for this path. Verified on a v6.19 KASAN build: mounting a crafted $LogFile whose client_data_len overflows trips a KASAN slab-out-of-bounds-read report in check_rstbl() before this fix; with check_add_overflow() applied, the same image is cleanly rejected during log replay and no KASAN report fires.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

No normalized assessments.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux b46acd6a6a627d876898e1c84d3f84902264b445 to < 03f222fbeb55b5b3b95dd70dd1cdcb02895a7d86 (affected · git)b46acd6a6a627d876898e1c84d3f84902264b445 to < fb9dd65b3bd11c3e26920e2e9ec1fd8fe63d3ba3 (affected · git)b46acd6a6a627d876898e1c84d3f84902264b445 to < 1921d296d3e79e188bed46592e0c84df6461cb99 (affected · git)b46acd6a6a627d876898e1c84d3f84902264b445 to < 89579415a00b776698334586e6ecf01efd00049c (affected · git)b46acd6a6a627d876898e1c84d3f84902264b445 to < 5352e7447219bf7777aa0cffe0752f655d9a0060 (affected · git)b46acd6a6a627d876898e1c84d3f84902264b445 to < 3d5dbe7706a9d58b8356731aaafefb8053711b27 (affected · git)b46acd6a6a627d876898e1c84d3f84902264b445 to < e2fcb0040b0b4097b2e97f3fbe77d3b66df9e816 (affected · git)Default: unaffected Linux · cna
Linux Linux 5.15 (affected)0 to < 5.15 (unaffected · semver)5.15.226 through 5.15.* (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.117 through 6.12.* (unaffected · semver)6.18.63 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

7

Provider assertions

1

Linux · cna

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

Provenance

Schema
5.2
Searchable
yes
Content hash
15b1c167c931fc901a09974b992284ab698020349d1763f244a6eb166d416d1c
Ingested
30 Nov 2026, 13:36:39 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected