Skip to main content
Menu
CVEs

Linux kernel premature free of in-use memory in execmem ROX cache

CVE-2026-138866EUVD-2026-138569Published November 30, 2026, updated

Exploited
No known exploitation
Fix
No fix listed
Who is exposed
Not reported

Summary

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

mm/execmem: free ROX cache chunks only when they span an entire vm area

Patch series "mm/execmem: fixes and cleanups for the ROX cache".

Sashiko review of the ROX cache refill path asked what happens when the PMD_SIZE allocation fails there. Pulling that thread uncovered a bit more than the fallback.

Patch 1 fixes a real bug, although rare bug: execmem_cache_clean() can free a chunk that is still partially in use, because a PMD sized and PMD aligned free range in the middle of a larger chunk looks exactly like a chunk that nobody uses.

Patch 2 handles maple tree allocation failures in the cache. They are unlikely, but silently dropping an area from the tree is not a great way to deal with them.

Patch 3 deals with the fallback that started all this. The cache exists to keep the direct map free of unnecessary splits, and the fallback happily filled it with base page mapped areas that could never be freed from the cache again. Ask vmalloc for a huge mapping or nothing, and serve whatever does not fit outside the cache.

Patches 4 and 5 convert the ROX cache to scope based cleanup.

The series was tested on x86 with module load/unload cycles, with PTDUMP confirming that the cache is using 2M mappings, and with nohugevmalloc to exercise the uncached fallback.

This patch (of 5):

When execmem refills the ROX cache, it vmalloc()s multiples of PMD_SIZE aligned to PMD_SIZE. For every such allocation vmalloc creates a vm area.

The first part of the vmalloc()ed chunk is returned to the allocation that triggered the cache refill and the remaining part is added to the cache and handed out for subsequent allocations with execmem_alloc().

When only the first part is freed, the entire vm area remains in the ROX cache and can be handed out again.

In the case when the first allocation is larger than PMD_SIZE and the second allocation from the freed first part of the chunk is exactly PMD_SIZE, execmem_cache_clean() will free the entire chunk while part of it is still in use.

For example:

/*

  • vmalloc(4M), return p0 to the caller
  • add [p0 + 3M, p0 + 4M) to the cache */ p0 = execmem_alloc(3M);

/* return p0 + 3M from the cache to the caller */ p1 = execmem_alloc(1M);

/* put [p0, p0 + 3M) back into the cache */ execmem_free(p0);

/* return p0 from the cache to the caller */ p2 = execmem_alloc(2M);

/* return p0 + 2M from the cache to the caller */ p3 = execmem_alloc(1M);

/* bah! execmem_cache_clean() frees the entire 4M chunk */ execmem_free(p2);

Make sure that the ranges that execmem_cache_clean() frees cover the entire vm area.

What to do

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-138866 (mm/execmem: free ROX cache chunks only when they span an entire vm area), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-138866 (entry last updated 2026-11-30):
Affected:
- Linux Linux: version range not reported
- Linux Linux: versions 6.13
Fixed versions: none listed yet.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-138866 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-138866 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://git.kernel.org/stable/c/e4dcde9709a25f5301f0a1cc5f6f76485aea2c48
- https://git.kernel.org/stable/c/8c60564f03e0f83dfe4ee4484a3adcd4426f1594
- https://git.kernel.org/stable/c/52d95a55a0113408acd2d4ce0294a72c527f5092
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-138866
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-138866"}.

Affected versions

cve.now Index

25Pof 100 · provisional · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure?/25Unknown. No advisory context yet
  • Reach20/20Affects Linux kernel (software on nearly every server, desktop or phone)
  • Severity?/10Unknown. No CVSS score or vendor rating
  • No patch5/5No patch listed yet

What would change the score

  • Would score about 80 if added to CISA KEV
  • Would score about 75 if CISA's SSVC rates exploitation active
  • Would score about 47 if advisories confirm default setups are exposed

Timeline

  1. CVE published
  2. First seen by cve.now

Evidence 5

Questions about CVE-2026-138866

Is CVE-2026-138866 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

Which versions are affected by CVE-2026-138866?

Linux: version 6.13.

Source: cve.now feed data

No corrections so far. Something wrong on this page? Report an error.