CVE-2025-38364

Source
https://cve.org/CVERecord?id=CVE-2025-38364
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38364.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38364
Downstream
Related
Published
2025-07-25T12:47:34.548Z
Modified
2026-03-20T12:42:49.828501Z
Summary
maple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate()
Details

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

mapletree: fix MASTATEPREALLOC flag in maspreallocate()

Temporarily clear the preallocation flag when explicitly requesting allocations. Pre-existing allocations are already counted against the request through masnodecountgfp(), but the allocations will not happen if the MASTATE_PREALLOC flag is set. This flag is meant to avoid re-allocating in bulk allocation mode, and to detect issues with preallocation calculations.

The MASTATEPREALLOC flag should also always be set on zero allocations so that detection of underflow allocations will print a WARN_ON() during consumption.

User visible effect of this flaw is a WARNON() followed by a null pointer dereference when subsequent requests for larger number of nodes is ignored, such as the vma merge retry in mmapregion() caused by drivers altering the vma flags (which happens in v6.6, at least)

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38364.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / 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"