CVE-2026-99995: ntfs: add a runlist merge that leaves the source runlist to the caller
In the Linux kernel, the following vulnerability has been resolved:
ntfs: add a runlist merge that leaves the source runlist to the caller
ntfsrunlistsmerge() frees the source runlist once its runs are in the destination. A caller that may have to undo the merge then has to work out its runs again from the merged runlist, where the first and the last of them may have been coalesced with neighbouring runs.
Add ntfsrunlistsmergekeepsrc(), which neither modifies nor frees the source runlist. For that, ntfsrlappend() and ntfsrlreplace() now merge the right-hand end into the copied run in the destination instead of into the last source run before copying it, and the merge helpers take the source as const, so the compiler checks that none of them writes to it. The merged runlist is the same as before.
For every caller, a source runlist without any mapped run, which the merge already warns about, now fails with -EINVAL instead of carrying on with nothing to insert: with no run copied, the right-hand merge into the destination would index before the insertion point.
The next patch uses ntfsrunlistsmergekeepsrc() to free exactly the clusters it allocated when it has to undo an $MFT data extension.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1
Event History
Frequently Asked Questions
What happens if a caller supplies a source runlist with no mapped run?
The merge now fails with -EINVAL. Previously, the code warned about this condition but continued without inserting anything.
Does the new merge path change the resulting merged runlist for valid inputs?
No. The merged runlist is stated to be the same as before.
How can a caller retain the source runlist after merging?
Use ntfs_runlists_merge_keep_src(), which does not modify or free the source runlist. This allows a caller to undo a merge while retaining the original run information.