In the Linux kernel, the following vulnerability has been resolved:
mm/mempolicy: fix memory leaks in weightedinterleaveauto_store()
weightedinterleaveautostore() fetches oldwi_state inside the if (!input) block only. This causes two memory leaks:
When a user writes "false" and the current mode is already manual, the function returns early without freeing the freshly allocated newwistate.
When a user writes "true", oldwistate stays NULL because the fetch is skipped entirely. The old state is then overwritten by rcuassignpointer() but never freed, since the cleanup path is gated on oldwistate being non-NULL. A user can trigger this repeatedly by writing "1" in a loop.
Fix both leaks by moving the oldwistate 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 donettom@linux.ibm.com
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46042.json",
"cna_assigner": "Linux"
}