CVE-2026-99816
published high CVSS 3.1 · 7.8fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux4342306f0f0d5ff4315a204d315c1b51b914fca5 to < 54c86540227047f1da386d95e495c39325b39ca5 · 4342306f0f0d5ff4315a204d315c1b51b914fca5 to < 7c9a86ea4ca7dad5e07b01c82f8b02ec1e248a27 · 4342306f0f0d5ff4315a204d315c1b51b914fca5 to < 1870c0cdc16b24dc781ab64ac7394e06231c2010 · 4342306f0f0d5ff4315a204d315c1b51b914fca5 to < 815ab354f4b53709959af1a0f8dd49177ec85f85 · 4342306f0f0d5ff4315a204d315c1b51b914fca5 to < b7d33425b951b7a14bb8bb4b3ef52f942bffc4f7 · 4342306f0f0d5ff4315a204d315c1b51b914fca5 to < ad39d8d90fa0fd99b2714d4c84c6f4e1c399f1f4 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.15 (affected) · 0 to < 5.15 (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.119 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 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 | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file attr_wof_frame_info() allocates, caches and dereferences ni->file.offs_folio under down_write(&ni->file.run_lock). ni_decompress_file() frees the same folio with folio_put() without taking run_lock. When a WOF externally-compressed file is opened for write, ni_decompress_file() can drop the last reference while a concurrent O_RDONLY reader is dereferencing the folio in attr_wof_frame_info(), leading to a use-after-free: BUG: KASAN: use-after-free in attr_wof_frame_info (fs/ntfs3/attrib.c:1619) Read of size 4 at addr ffff8880120c9000 by task exploit Call Trace: attr_wof_frame_info (fs/ntfs3/attrib.c:1619) ni_read_frame (fs/ntfs3/frecord.c:2421) ni_read_folio_cmpr (fs/ntfs3/frecord.c:1916) ntfs_read_folio (fs/ntfs3/inode.c:648) read_pages (mm/readahead.c:181) page_cache_ra_unbounded (mm/readahead.c:292) force_page_cache_ra (mm/readahead.c:364) page_cache_sync_ra (mm/readahead.c:573) filemap_get_pages (mm/filemap.c:2688) filemap_read (mm/filemap.c:2806) generic_file_read_iter (mm/filemap.c:2994) ntfs_file_read_iter (fs/ntfs3/file.c:842) vfs_read (fs/read_write.c:574) __x64_sys_pread64 (fs/read_write.c:773) Take run_lock around the folio_put(), as is done for every other access to ni->file.offs_folio.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The patched ni_decompress_file() is reached only from ntfs_file_open() on a local open(2) with O_WRONLY/O_RDWR/O_TRUNC, racing a local pread64 -> ntfs_read_folio -> ni_read_folio_cmpr -> ni_read_frame -> attr_wof_frame_info(). This is a pure locking defect: no malformed input exists, and no remote protocol supplies or reads back the data the defect damages. AC:L - The attacker runs both sides: a pread loop (fadvise DONTNEED, frames in another offset-table page so ntfs_read_run I/O happens under run_lock) against their own open(O_WRONLY). Each try decompresses one WOF file, but CompactOS volumes or the user's own udisks2 loop-mounted image hold many. The reporter's KASAN trace comes from an "exploit" task. PR:L - Needs only ordinary read and write permission on a WOF-compressed file on a read-write ntfs3 mount. ntfs3 sets owner and mode of Windows-created files from mount uid/fmask (udisks2 passes the session uid=), and ntfs_file_open() has no capability check. ntfs3 lacks FS_USERNS_MOUNT, so this is a normal local user, not namespace root. UI:N - No crafted image is needed. Files with IO_REPARSE_TAG_COMPRESS plus WofCompressedData are legitimate Windows compact/CompactOS content that ni_parse_reparse() accepts. The attacker issues both the triggering open and the racing reads, so no victim takes any action. S:U - The freed folio and every structure that can reuse the page are in the same kernel. This is local privilege escalation within one security authority, with no guest, IOMMU or sandbox boundary crossed. C:H - attr_wof_frame_info() keeps reading offsets from offs_folio after ni_decompress_file() has returned it to the buddy allocator (KASAN use-after-free). Combined with the write primitive, cross-cache page reuse gives kernel memory disclosure. I:H - When the frame's offset entry is on a page other than folio->index, the stale reader's ntfs_read_run() copies up to PAGE_SIZE bytes of WofCompressedData into the freed page. It also writes folio->index and calls folio_unlock on it, corrupting whatever reallocated that page. A:H - Use of the freed offs_folio, and corruption of the page's new owner, produce KASAN reports, oopses or panics. The attacker can repeat this once per available WOF file.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 4342306f0f0d5ff4315a204d315c1b51b914fca5 to < 54c86540227047f1da386d95e495c39325b39ca5 (affected · git)4342306f0f0d5ff4315a204d315c1b51b914fca5 to < 7c9a86ea4ca7dad5e07b01c82f8b02ec1e248a27 (affected · git)4342306f0f0d5ff4315a204d315c1b51b914fca5 to < 1870c0cdc16b24dc781ab64ac7394e06231c2010 (affected · git)4342306f0f0d5ff4315a204d315c1b51b914fca5 to < 815ab354f4b53709959af1a0f8dd49177ec85f85 (affected · git)4342306f0f0d5ff4315a204d315c1b51b914fca5 to < b7d33425b951b7a14bb8bb4b3ef52f942bffc4f7 (affected · git)4342306f0f0d5ff4315a204d315c1b51b914fca5 to < ad39d8d90fa0fd99b2714d4c84c6f4e1c399f1f4 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.15 (affected)0 to < 5.15 (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.119 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
6- https://git.kernel.org/stable/c/1870c0cdc16b24dc781ab64ac7394e06231c2010
- https://git.kernel.org/stable/c/54c86540227047f1da386d95e495c39325b39ca5
- https://git.kernel.org/stable/c/7c9a86ea4ca7dad5e07b01c82f8b02ec1e248a27
- https://git.kernel.org/stable/c/815ab354f4b53709959af1a0f8dd49177ec85f85
- https://git.kernel.org/stable/c/ad39d8d90fa0fd99b2714d4c84c6f4e1c399f1f4
- https://git.kernel.org/stable/c/b7d33425b951b7a14bb8bb4b3ef52f942bffc4f7
Provider assertions
1Linux · cna
fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 610dd348a655c39eb38547f0224d847f68c7dc7797ebff05d973694c1b685ad5
- Ingested
- 01 Dec 2026, 05:47:23 UTC
- Source record
- Official CVE record