ntfs: avoid stale runlist element dereference in MFT writeback
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Original description
In the Linux kernel, the following vulnerability has been resolved:
ntfs: avoid stale runlist element dereference in MFT writeback
ntfs_write_mft_block() maps each $MFT record through the $MFT data runlist. For sub-folio clusters it looks up a struct runlist_element under ni->runlist.lock, drops the lock, and later uses rl->length and rl->vcn when choosing folio_sz.
That pointer is only borrowed from ni->runlist.rl. Concurrent $MFT allocation extension can merge a replacement runlist under the same lock, and ntfs_rl_realloc() can free the old backing array. If that happens between the lookup and the later folio_sz decision, writeback can dereference freed runlist storage.
The buggy scenario involves two paths, with each column showing the order within that path:
MFT writeback path: $MFT allocation extension: 1. Look up rl under 1. Extend the $MFT data allocation. ni->runlist.lock. 2. Publish a replacement runlist. 2. Drop ni->runlist.lock. 3. Free the old runlist array. 3. Read rl->length and rl->vcn to choose folio_sz.
Compute the remaining run length while ni->runlist.lock is still held, and use that scalar after unlock. This preserves the existing folio sizing decision without carrying a borrowed runlist_element across the lock boundary.
Validation reproduced this kernel report: BUG: KASAN: slab-use-after-free in ntfs_mft_writepages+0x1c8d/0x1fb0
From the CVE record · Linux
References
- git.kernel.org/stable/c/9a2e36963a3fc52401586657d34e3f1c5a01ea56
- git.kernel.org/stable/c/81fe702ff1760da32bcd3ef4494b2a33dbeced72
- github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72354.json
- nvd.nist.gov/vuln/detail/CVE-2026-72354
- git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git