{"id":"CVE-2026-53373","summary":"mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap()\n\nThe mmap_prepare hook functionality includes the ability to invoke\nmmap_prepare() from the mmap() hook of existing 'stacked' drivers, that is\nones which are capable of calling the mmap hooks of other drivers/file\nsystems (e.g.  overlayfs, shm).\n\nAs part of the mmap_prepare action functionality, we deal with errors by\nunmapping the VMA should one arise.  This works in the usual mmap_prepare\ncase, as we invoke this action at the last moment, when the VMA is\nestablished in the maple tree.\n\nHowever, the mmap() hook passes a not-fully-established VMA pointer to the\ncaller (which is the motivation behind the mmap_prepare() work), which is\ndetached.\n\nSo attempting to unmap a VMA in this state will be problematic, with the\nmost obvious symptom being a warning in vma_mark_detached(), because the\nVMA is already detached.\n\nIt's also unncessary - the mmap() handler will clean up the VMA on error.\n\nSo to fix this issue, this patch propagates whether or not an mmap action\nis being completed via the compatibility layer or directly.\n\nIf the former, then we do not attempt VMA cleanup, if the latter, then we\ndo.\n\nThis patch also updates the userland VMA tests to reflect the change.","modified":"2026-07-22T05:30:11.703364593Z","published":"2026-07-19T10:01:57.632Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53373.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/5394bcb746503f2ae4b206212416dccea78e3773"},{"type":"WEB","url":"https://git.kernel.org/stable/c/619eab23e1ce7c97e54bfc5a417306d94b3f6f13"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53373.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53373"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ac0a3fc9c07df79dc8a4ce9d274df00afc7bf12d"},{"fixed":"5394bcb746503f2ae4b206212416dccea78e3773"},{"fixed":"619eab23e1ce7c97e54bfc5a417306d94b3f6f13"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53373.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.0.9"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53373.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}