CVE-2026-46042 mm/mempolicy: fix memory leaks in weighted_interleave_auto_store()

Medium 5.5 Published Updated

A local attacker can trigger memory leaks in the Linux kernel's mempolicy subsystem, leading to resource exhaustion and potential denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-46042?

CVE-2026-46042 is a medium-severity denial of service vulnerability in Linux kernel, published on 27 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

mm/mempolicy: fix memory leaks in weighted_interleave_auto_store()

weighted_interleave_auto_store() fetches old_wi_state inside the if (!input) block only. This causes two memory leaks:

1. When a user writes "false" and the current mode is already manual, the function returns early without freeing the freshly allocated new_wi_state.

2. When a user writes "true", old_wi_state stays NULL because the fetch is skipped entirely. The old state is then overwritten by rcu_assign_pointer() but never freed, since the cleanup path is gated on old_wi_state being non-NULL. A user can trigger this repeatedly by writing "1" in a loop.

Fix both leaks by moving the old_wi_state fetch before the input check, making it unconditional. This also allows a unified early return for both "true" and "false" when the requested mode matches the current mode.

Reviewed by: Donet Tom <[email protected]>

Weakness: CWE-401

Which versions are affected by CVE-2026-46042?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2026-46042?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-46042 being exploited?

There is no known exploitation of CVE-2026-46042 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2026-46042, DEBIAN-CVE-2026-46042, GHSA-pmw2-6gh9-j59g, UBUNTU-CVE-2026-46042.

Is CVE-2026-46042 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free