CVE-2026-138900: mm/mempolicy: take a cpuset cookie for the interleave node count

Published Nov 30, 2026
·
Updated

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

mm/mempolicy: take a cpuset cookie for the interleave node count

allocpagesbulkinterleave() counts pol->nodes without a cpuset cookie:

nodes = nodesweight(pol->nodes); nrpagespernode = nrpages / nodes;

nodemaskt spans several words once MAXNUMNODES exceeds BITSPERLONG, so a concurrent cpuset rebind can tear that read and yield an empty mask even though neither version of it was empty. The call then allocates nothing and returns 0.

Some compilers will hoist the loop entry test above the division, because nrpagespernode is dead when the loop does not run.

682e: call ... <- nodesweight() 6838: test %eax,%eax 683a: jle 692d <- nodes <= 0 skips the loop 684a: div %rcx

So in most deployments, this div/0 is unreachable - but nothing in the source guarantees that, it's just not easily exercised.

Take the cookie around the count and bail if the mask really is empty. Only the count needs it, interleavenodes() takes the cookie itself so so a torn read there is already retried.

A rebind landing mid-loop can still leave the count disagreeing with the mask, so the loop may revisit a node or skip one - but a rebind where nodes change causes migration, so a handful of misplaced pages isn't catastrophic in any sense.

Measured on a 72 node VM (NODESSHIFT=10) with a cgroup v2 cpuset flipping cpuset.mems between a word 0 and a word 1 node set, and the two word read artificially widened: 330 zero counts in 130414 calls without the cookie, and 401 retries with it.

Affected Software

10 affected componentsFixes available
Linux Linux kernel
linux/kernel>=5.16.0<6.1.193
6.1.193
linux/kernel>=6.2.0<6.6.163
6.6.163
linux/kernel>=6.7.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.63
6.18.63
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux*
debian/linux<6.12.117-1
6.12.117-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux<=6.1.176-1, <=6.1.192-3
6.12.117-17.3.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.1.193
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.163
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.63
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.4
  6. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1
  7. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.4-1
  8. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1Fixed in 7.3.4-1
  9. Compensating control

    In alloc_pages_bulk_interleave(), take a cpuset cookie around the interleave node count and bail out if the mask is empty.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:26 PM
Data Sourced
via MITRE·01:26 PM
Description
Data Sourced
via OSV·01:26 PM
DescriptionAffected Software
Data Sourced
via NVD·02:17 PM
Description

Frequently Asked Questions

1

What conditions are required to trigger the issue?

A concurrent cpuset rebind must occur while alloc_pages_bulk_interleave() is counting the interleave policy node mask. The race matters when the node mask spans multiple words, which occurs when MAX_NUMNODES exceeds BITS_PER_LONG.

2

Is division by zero the expected result of this race?

Usually no. In most deployments, compiler-generated control flow checks whether the node count is non-positive and skips the allocation loop before the division; however, the source does not guarantee this ordering, so the condition is not considered safely unreachable.

3

What behavior may occur if the race is hit?

The torn node-mask read can appear empty even though neither actual mask version was empty, causing the function to allocate no pages and return 0. A cpuset rebind during the allocation loop can also make the initial count disagree with the later mask, potentially revisiting or skipping a node.

4

What does the fix change?

The fix takes a cpuset cookie while counting the interleave-policy nodes and exits only when the mask is genuinely empty. The per-node iteration already uses its own cookie and retries torn reads.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203