{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-46042","id":"CVE-2026-46042","title":"mm/mempolicy: fix memory leaks in weighted_interleave_auto_store()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: fix memory leaks in weighted_interleave_auto_store()\n\nweighted_interleave_auto_store() fetches old_wi_state inside the if\n(!input) block only.  This causes two memory leaks:\n\n1. When a user writes \"false\" and the current mode is already manual,\n   the function returns early without freeing the freshly allocated\n   n","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: fix memory leaks in weighted_interleave_auto_store()\n\nweighted_interleave_auto_store() fetches old_wi_state inside the if\n(!input) block only.  This causes two memory leaks:\n\n1. When a user writes \"false\" and the current mode is already manual,\n   the function returns early without freeing the freshly allocated\n   new_wi_state.\n\n2. When a user writes \"true\", old_wi_state stays NULL because the\n   fetch is skipped entirely. The old state is then overwritten by\n   rcu_assign_pointer() but never freed, since the cleanup path is\n   gated on old_wi_state being non-NULL. A user can trigger this\n   repeatedly by writing \"1\" in a loop.\n\nFix both leaks by moving the old_wi_state fetch before the input check,\nmaking it unconditional.  This also allows a unified early return for both\n\"true\" and \"false\" when the requested mode matches the current mode.\n\nReviewed by: Donet Tom <donettom@linux.ibm.com>","published":"2026-05-27T12:56:56.830Z","updated":"2026-10-28T02:30:52.762620050Z","reserved":"2026-05-13T15:03:33.094Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e341f9c3c8412e57fe0042a33a2640245ecdf619","lessThan":"c42a7efb9060d89b72708ffaf255d0002c2164a7","status":"affected","versionType":"git"},{"version":"e341f9c3c8412e57fe0042a33a2640245ecdf619","lessThan":"39caa9ca863f96b3d00447c5aa200cabda489856","status":"affected","versionType":"git"},{"version":"e341f9c3c8412e57fe0042a33a2640245ecdf619","lessThan":"6fae274ce0e3109cbbc4c18b354eaace1f0af7d7","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","lessThan":"6.16","status":"unaffected","versionType":"semver"},{"version":"6.18.27","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.0.4","lessThanOrEqual":"7.0.*","status":"unaffected","versionType":"semver"},{"version":"7.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-401"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/c42a7efb9060d89b72708ffaf255d0002c2164a7","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/39caa9ca863f96b3d00447c5aa200cabda489856","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/6fae274ce0e3109cbbc4c18b354eaace1f0af7d7","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46042.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46042","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00126,"epssPercentile":0.02372,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-46042","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46042","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-46042","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-46042","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}