# CVE-2026-53373: mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.12%, higher than 1% of CVEs (2026-12-02)
- Published: 2026-07-19T10:01:57.632Z
- Modified: 2026-08-05T12:35:17.519Z
- Assigned by: Linux

## Description

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

mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap()

The mmap_prepare hook functionality includes the ability to invoke
mmap_prepare() from the mmap() hook of existing 'stacked' drivers, that is
ones which are capable of calling the mmap hooks of other drivers/file
systems (e.g.  overlayfs, shm).

As part of the mmap_prepare action functionality, we deal with errors by
unmapping the VMA should one arise.  This works in the usual mmap_prepare
case, as we invoke this action at the last moment, when the VMA is
established in the maple tree.

However, the mmap() hook passes a not-fully-established VMA pointer to the
caller (which is the motivation behind the mmap_prepare() work), which is
detached.

So attempting to unmap a VMA in this state will be problematic, with the
most obvious symptom being a warning in vma_mark_detached(), because the
VMA is already detached.

It's also unncessary - the mmap() handler will clean up the VMA on error.

So to fix this issue, this patch propagates whether or not an mmap action
is being completed via the compatibility layer or directly.

If the former, then we do not attempt VMA cleanup, if the latter, then we
do.

This patch also updates the userland VMA tests to reflect the change.

(As written by CVE List.)

## Affected

- Linux Linux: from ac0a3fc9c07df79dc8a4ce9d274df00afc7bf12d before 5394bcb746503f2ae4b206212416dccea78e3773; from ac0a3fc9c07df79dc8a4ce9d274df00afc7bf12d before 619eab23e1ce7c97e54bfc5a417306d94b3f6f13; 6.19 (not affected: before 6.19; from 7.0.9 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.19 before 7.0.9; 7.1

## References

- <https://git.kernel.org/stable/c/5394bcb746503f2ae4b206212416dccea78e3773> (patch)
- <https://git.kernel.org/stable/c/619eab23e1ce7c97e54bfc5a417306d94b3f6f13> (patch)

## Sources

- CVE List: [CVE-2026-53373](https://www.cve.org/CVERecord?id=CVE-2026-53373), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2026-53373](https://nvd.nist.gov/vuln/detail/CVE-2026-53373), Public domain, modified 2026-07-29

---

Page: https://cve.day/CVE-2026-53373 · Whole record: https://cve.day/CVE-2026-53373.json · Rebuilt by cve.day 2026-11-25T22:59:28.677Z
