# CVE-2025-38364: maple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate()

Status: published. Published: 2025-07-25. Updated: 2026-11-05.

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

maple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate()

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

The MA_STATE_PREALLOC 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 WARN_ON() followed by a null pointer
dereference when subsequent requests for larger number of nodes is
ignored, such as the vma merge retry in mmap_region() caused by drivers
altering the vma flags (which happens in v6.6, at least)

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Linux / Linux: ≥ 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa; < d69cd64bd5af41c6fd409313504089970edaf02f (affected, git); ≥ 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa; < e63032e66bca1d06e600033f3369ba3db3af0870 (affected, git); ≥ 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa; < cf95f8426f889949b738f51ffcd72884411f3a6a (affected, git); ≥ 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa; < 9e32f4700867abbd5d19abfcf698dbd0d2ce36a4 (affected, git); ≥ 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa; < fba46a5d83ca8decb338722fb4899026d8d9ead2 (affected, git). Source: CNA: Linux
- Linux / Linux: 6.1 (affected); ≥ 0; < 6.1 (unaffected, semver); ≥ 6.1.146; ≤ 6.1.* (unaffected, semver); ≥ 6.6.99; ≤ 6.6.* (unaffected, semver); ≥ 6.12.36; ≤ 6.12.* (unaffected, semver); ≥ 6.15.5; ≤ 6.15.* (unaffected, semver); ≥ 6.16; ≤ * (unaffected, original_commit_for_fix). Source: CNA: Linux
- Siemens / SIMATIC S7-1500 CPU 1518-4 PN/DP MFP: ≥ V3.1.5; < * (affected, custom). Source: ADP: siemens-SADP
- Siemens / SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP: ≥ V3.1.5; < * (affected, custom). Source: ADP: siemens-SADP
- Siemens / SIPLUS S7-1500 CPU 1518-4 PN/DP MFP: ≥ V3.1.5; < * (affected, custom). Source: ADP: siemens-SADP

## Severity and prioritization

- CISA KEV: No listing in collected sources

- EPSS: 0.19% as of 2026-11-05; percentile 8.66%

- SSVC: exploitation none; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: Not reported

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://git.kernel.org/stable/c/d69cd64bd5af41c6fd409313504089970edaf02f (CNA: Linux)

- https://git.kernel.org/stable/c/e63032e66bca1d06e600033f3369ba3db3af0870 (CNA: Linux)

- https://git.kernel.org/stable/c/cf95f8426f889949b738f51ffcd72884411f3a6a (CNA: Linux)

- https://git.kernel.org/stable/c/9e32f4700867abbd5d19abfcf698dbd0d2ce36a4 (CNA: Linux)

- https://git.kernel.org/stable/c/fba46a5d83ca8decb338722fb4899026d8d9ead2 (CNA: Linux)

- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html (ADP: CVE)

- https://cert-portal.siemens.com/productcert/html/ssa-082556.html (ADP: siemens-SADP)

## Provenance

- CNA: Linux: https://www.cve.org/CVERecord?id=CVE-2025-38364; retrieved 2026-11-05; source updated 2026-11-05

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2025-38364; retrieved 2026-11-05; source updated Not reported

Revision: 29ad56a48bc381307594507ee9263d9a652c759cb87b0d50fc7e18dac4687d13

Canonical: https://y2.dev/cve/CVE-2025-38364

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.