Skip to contentSkip to conversation

CVE-2026-98140: ntfs: fix kmap_local leak in write_mft_record_nolock() error paths

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ntfs: fix kmap_local leak in write_mft_record_nolock() error paths

write_mft_record_nolock() maps the MFT record folio with kmap_local_folio(), but the pre_write_mst_fixup() and bio_add_folio() failure paths jump to the error label without unmapping it. kmap_local mappings are stack-ordered per task, so leaking one corrupts the nesting for any outer mapping.

Unmap the folio on those error paths too.

The Linux kernel CVE team has assigned CVE-2026-98140 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 7.1 with commit 115380f9a2f9675c7924563cbba70d40cae8fb81 and fixed in 7.2.7 with commit 5d7f7bf8fba8cf563b42b44aa4ab3d9928ac480c
	Issue introduced in 7.1 with commit 115380f9a2f9675c7924563cbba70d40cae8fb81 and fixed in 7.3-rc2 with commit cf06dcd572845723821b54a608fc2da995c3c8e2

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98140

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/ntfs/mft.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/5d7f7bf8fba8cf563b42b44aa4ab3d9928ac480c
	https://git.kernel.org/stable/c/cf06dcd572845723821b54a608fc2da995c3c8e2