CVE-2026-46042 Details
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]>
A memory leak vulnerability has been identified in the Linux kernel's memory policy management, specifically within the 'weighted_interleave_auto_store()' function. This issue arises because the function only retrieves the 'old_wi_state' when no input is provided, leading to two distinct memory leaks. First, if a user inputs 'false' while the current mode is already manual, the function exits prematurely without freeing the newly allocated 'new_wi_state'. Second, when 'true' is input, the 'old_wi_state' remains NULL as the fetch is bypassed, causing the old state to be overwritten without being freed, since the cleanup process relies on 'old_wi_state' being non-NULL'. This vulnerability can be exploited by repeatedly writing '1' in a loop.
Users can upgrade to the latest version of the Linux kernel where this vulnerability has been fixed. Instructions for upgrading the Linux kernel can be found in the official Linux documentation or through the package manager for your Linux distribution.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/39caa9ca863f96b3d00447c5aa200cabda489856 | kernel.org | Patch |
| https://git.kernel.org/stable/c/6fae274ce0e3109cbbc4c18b354eaace1f0af7d7 | kernel.org | Patch |
| https://git.kernel.org/stable/c/c42a7efb9060d89b72708ffaf255d0002c2164a7 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-401 | Missing Release of Memory after Effective Lifetime | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.16, < 6.18.27 >= 6.19, < 7.0.4 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 16, 2026 | Initial Analysis | [email protected] |
| May 27, 2026 | New CVE Received | kernel.org |