{"api_version":"1","generated_at":"2026-06-04T13:00:46+00:00","cve":"CVE-2026-46042","urls":{"html":"https://cve.report/CVE-2026-46042","api":"https://cve.report/api/cve/CVE-2026-46042.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-46042","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-46042"},"summary":{"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   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>","state":"PUBLISHED","assigner":"Linux","published_at":"2026-05-27 14:17:23","updated_at":"2026-05-27 14:48:03"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/39caa9ca863f96b3d00447c5aa200cabda489856","name":"https://git.kernel.org/stable/c/39caa9ca863f96b3d00447c5aa200cabda489856","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/c42a7efb9060d89b72708ffaf255d0002c2164a7","name":"https://git.kernel.org/stable/c/c42a7efb9060d89b72708ffaf255d0002c2164a7","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6fae274ce0e3109cbbc4c18b354eaace1f0af7d7","name":"https://git.kernel.org/stable/c/6fae274ce0e3109cbbc4c18b354eaace1f0af7d7","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-46042","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46042","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e341f9c3c8412e57fe0042a33a2640245ecdf619 c42a7efb9060d89b72708ffaf255d0002c2164a7 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e341f9c3c8412e57fe0042a33a2640245ecdf619 39caa9ca863f96b3d00447c5aa200cabda489856 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e341f9c3c8412e57fe0042a33a2640245ecdf619 6fae274ce0e3109cbbc4c18b354eaace1f0af7d7 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.16","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.16 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.27 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0.4 7.0.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"46042","cve":"CVE-2026-46042","epss":"0.000170000","percentile":"0.042650000","score_date":"2026-06-01","updated_at":"2026-06-02 00:05:21"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/mempolicy.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"c42a7efb9060d89b72708ffaf255d0002c2164a7","status":"affected","version":"e341f9c3c8412e57fe0042a33a2640245ecdf619","versionType":"git"},{"lessThan":"39caa9ca863f96b3d00447c5aa200cabda489856","status":"affected","version":"e341f9c3c8412e57fe0042a33a2640245ecdf619","versionType":"git"},{"lessThan":"6fae274ce0e3109cbbc4c18b354eaace1f0af7d7","status":"affected","version":"e341f9c3c8412e57fe0042a33a2640245ecdf619","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/mempolicy.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.16"},{"lessThan":"6.16","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.27","versionType":"semver"},{"lessThanOrEqual":"7.0.*","status":"unaffected","version":"7.0.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.1-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.27","versionStartIncluding":"6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0.4","versionStartIncluding":"6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.1-rc1","versionStartIncluding":"6.16","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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>"}],"providerMetadata":{"dateUpdated":"2026-05-27T12:56:56.830Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/c42a7efb9060d89b72708ffaf255d0002c2164a7"},{"url":"https://git.kernel.org/stable/c/39caa9ca863f96b3d00447c5aa200cabda489856"},{"url":"https://git.kernel.org/stable/c/6fae274ce0e3109cbbc4c18b354eaace1f0af7d7"}],"title":"mm/mempolicy: fix memory leaks in weighted_interleave_auto_store()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-46042","datePublished":"2026-05-27T12:56:56.830Z","dateReserved":"2026-05-13T15:03:33.094Z","dateUpdated":"2026-05-27T12:56:56.830Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-05-27 14:17:23","lastModifiedDate":"2026-05-27 14:48:03","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"46042","Ordinal":"1","Title":"mm/mempolicy: fix memory leaks in weighted_interleave_auto_store","CVE":"CVE-2026-46042","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"46042","Ordinal":"1","NoteData":"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>","Type":"Description","Title":"mm/mempolicy: fix memory leaks in weighted_interleave_auto_store"}]}}}