{"id":"CVE-2026-139417","state":"PUBLISHED","title":"platform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse\n\nThe driver stores its state in a single file-scope static struct\namd_pmc_dev, which is reused on every bind. Its regbase, smu_virt_addr,\nstb_virt_addr and fch_virt_addr members are MMIO mappings created with\ndevm_ioremap().\n\nOn unbind the driver core unmaps these mappings, but it does not clear\nthe pointers in the static struct. Since the struct is not freed, the\nmembers keep pointing at the now-unmapped addresses.\n\nOn the next bind, the probe path re-maps a region only when its pointer\nis still NULL, so the stale pointer is reused and the following\nmemcpy_fromio()/ioread32() touches freed MMIO, causing use-after-unmap\ncrash. Clear these pointers in amd_pmc_remove() so the next probe re-maps\nthem instead of reusing stale ones.","publishedAt":"2026-11-30T13:34:33.753Z","updatedAt":"2026-11-30T13:34:33.753Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"156ec4731cb22b06c08e27debc1ef9f16f4bbb5e","status":"affected","lessThan":"5c165afce641c5f5621ea61f46d5f72b8a81cdd0","versionType":"git"},{"version":"156ec4731cb22b06c08e27debc1ef9f16f4bbb5e","status":"affected","lessThan":"3933c18b616acfb790e4dd3157c6aee6fe4d83ec","versionType":"git"},{"version":"156ec4731cb22b06c08e27debc1ef9f16f4bbb5e","status":"affected","lessThan":"d7d78fc750c15b23864848c0f06b038e825c5584","versionType":"git"},{"version":"156ec4731cb22b06c08e27debc1ef9f16f4bbb5e","status":"affected","lessThan":"c9ba86f5411730ebd333d94b9e1aa8f652dc743f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/platform/x86/amd/pmc/pmc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/platform/x86/amd/pmc/pmc.c"]}],"references":["https://git.kernel.org/stable/c/5c165afce641c5f5621ea61f46d5f72b8a81cdd0","https://git.kernel.org/stable/c/3933c18b616acfb790e4dd3157c6aee6fe4d83ec","https://git.kernel.org/stable/c/d7d78fc750c15b23864848c0f06b038e825c5584","https://git.kernel.org/stable/c/c9ba86f5411730ebd333d94b9e1aa8f652dc743f"],"weaknesses":[],"ingestedAt":"2026-11-30T13:48:04.491Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139417.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139417","state":"PUBLISHED","datePublished":"2026-11-30T13:34:33.753Z","dateUpdated":"2026-11-30T13:34:33.753Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.932Z"},"containers":{"cna":{"title":"platform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse\n\nThe driver stores its state in a single file-scope static struct\namd_pmc_dev, which is reused on every bind. Its regbase, smu_virt_addr,\nstb_virt_addr and fch_virt_addr members are MMIO mappings created with\ndevm_ioremap().\n\nOn unbind the driver core unmaps these mappings, but it does not clear\nthe pointers in the static struct. Since the struct is not freed, the\nmembers keep pointing at the now-unmapped addresses.\n\nOn the next bind, the probe path re-maps a region only when its pointer\nis still NULL, so the stale pointer is reused and the following\nmemcpy_fromio()/ioread32() touches freed MMIO, causing use-after-unmap\ncrash. Clear these pointers in amd_pmc_remove() so the next probe re-maps\nthem instead of reusing stale ones."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"156ec4731cb22b06c08e27debc1ef9f16f4bbb5e","status":"affected","lessThan":"5c165afce641c5f5621ea61f46d5f72b8a81cdd0","versionType":"git"},{"version":"156ec4731cb22b06c08e27debc1ef9f16f4bbb5e","status":"affected","lessThan":"3933c18b616acfb790e4dd3157c6aee6fe4d83ec","versionType":"git"},{"version":"156ec4731cb22b06c08e27debc1ef9f16f4bbb5e","status":"affected","lessThan":"d7d78fc750c15b23864848c0f06b038e825c5584","versionType":"git"},{"version":"156ec4731cb22b06c08e27debc1ef9f16f4bbb5e","status":"affected","lessThan":"c9ba86f5411730ebd333d94b9e1aa8f652dc743f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/platform/x86/amd/pmc/pmc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/platform/x86/amd/pmc/pmc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5c165afce641c5f5621ea61f46d5f72b8a81cdd0"},{"url":"https://git.kernel.org/stable/c/3933c18b616acfb790e4dd3157c6aee6fe4d83ec"},{"url":"https://git.kernel.org/stable/c/d7d78fc750c15b23864848c0f06b038e825c5584"},{"url":"https://git.kernel.org/stable/c/c9ba86f5411730ebd333d94b9e1aa8f652dc743f"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:34:33.753Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}