{"id":"CVE-2025-38364","summary":"maple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmaple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate()\n\nTemporarily clear the preallocation flag when explicitly requesting\nallocations.  Pre-existing allocations are already counted against the\nrequest through mas_node_count_gfp(), but the allocations will not happen\nif the MA_STATE_PREALLOC flag is set.  This flag is meant to avoid\nre-allocating in bulk allocation mode, and to detect issues with\npreallocation calculations.\n\nThe MA_STATE_PREALLOC flag should also always be set on zero allocations\nso that detection of underflow allocations will print a WARN_ON() during\nconsumption.\n\nUser visible effect of this flaw is a WARN_ON() followed by a null pointer\ndereference when subsequent requests for larger number of nodes is\nignored, such as the vma merge retry in mmap_region() caused by drivers\naltering the vma flags (which happens in v6.6, at least)","modified":"2026-04-16T00:01:56.957444732Z","published":"2025-07-25T12:47:34.548Z","related":["SUSE-SU-2025:02853-1","SUSE-SU-2025:02923-1","SUSE-SU-2025:02969-1","SUSE-SU-2025:02996-1","SUSE-SU-2025:02997-1","SUSE-SU-2025:03011-1","SUSE-SU-2025:03023-1","SUSE-SU-2025:20577-1","SUSE-SU-2025:20586-1","SUSE-SU-2025:20601-1","SUSE-SU-2025:20602-1","SUSE-SU-2025:21074-1","SUSE-SU-2025:21139-1","SUSE-SU-2025:21179-1","openSUSE-SU-2025:20081-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38364.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/9e32f4700867abbd5d19abfcf698dbd0d2ce36a4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cf95f8426f889949b738f51ffcd72884411f3a6a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d69cd64bd5af41c6fd409313504089970edaf02f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e63032e66bca1d06e600033f3369ba3db3af0870"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fba46a5d83ca8decb338722fb4899026d8d9ead2"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38364.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38364"},{"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":"54a611b605901c7d5d05b6b8f5d04a6ceb0962aa"},{"fixed":"d69cd64bd5af41c6fd409313504089970edaf02f"},{"fixed":"e63032e66bca1d06e600033f3369ba3db3af0870"},{"fixed":"cf95f8426f889949b738f51ffcd72884411f3a6a"},{"fixed":"9e32f4700867abbd5d19abfcf698dbd0d2ce36a4"},{"fixed":"fba46a5d83ca8decb338722fb4899026d8d9ead2"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38364.json"}}],"schema_version":"1.7.5"}