fs/ntfs3: validate dirty page table on log replay
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b46acd6a6a627d876898e1c84d3f84902264b445 · < 0908da07c23be4f94b99dfd9a94765525f0fe4bd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: validate dirty page table on log replay
Each DIR_PAGE_ENTRY ends in a page_lcns[] array whose length is the on-disk lcns_follow field. check_rstbl() validates the table bookkeeping but never checks that this array fits in the entry, so a crafted lcns_follow lets the v0->v1 conversion memmove and later replay passes run off the entry.
Add check_dp_table() to reject, right after check_rstbl(), any entry larger than its size claims via struct_size() (the same expression used to allocate these entries, so the check is overflow-safe by construction). All consumers can then trust lcns_follow as the real capacity. This covers every page_lcns[] access whose index is bounded by the entry itself (the conversion memmove, the HotFix store via find_dp(), and the self-bounded scan loops). Accesses whose index comes from the log record need a separate bound and are handled in a follow-up patch.
From the CVE record · Linux
The Linux kernel’s ntfs3 log replay code does not validate that a dirty page table entry’s page_lcns[] array fits within the entry. A crafted on-disk lcns_follow value can cause out-of-bounds access during replay. The input does not specify whether access is local or network-based, whether authentication is required, or whether user interaction is needed.
Engineers running Linux kernels with fs/ntfs3 should check their exposure; affected versions are not specified.