platform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

platform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse

The driver stores its state in a single file-scope static struct amd_pmc_dev, which is reused on every bind. Its regbase, smu_virt_addr, stb_virt_addr and fch_virt_addr members are MMIO mappings created with devm_ioremap().

On unbind the driver core unmaps these mappings, but it does not clear the pointers in the static struct. Since the struct is not freed, the members keep pointing at the now-unmapped addresses.

On the next bind, the probe path re-maps a region only when its pointer is still NULL, so the stale pointer is reused and the following memcpy_fromio()/ioread32() touches freed MMIO, causing use-after-unmap crash. Clear these pointers in amd_pmc_remove() so the next probe re-maps them instead of reusing stale ones.

ProductVersions
Linux Linux156ec4731cb22b06c08e27debc1ef9f16f4bbb5e to before 5c165afce641c5f5621ea61f46d5f72b8a81cdd0 Affected156ec4731cb22b06c08e27debc1ef9f16f4bbb5e to before 3933c18b616acfb790e4dd3157c6aee6fe4d83ec Affected156ec4731cb22b06c08e27debc1ef9f16f4bbb5e to before d7d78fc750c15b23864848c0f06b038e825c5584 Affected156ec4731cb22b06c08e27debc1ef9f16f4bbb5e to before c9ba86f5411730ebd333d94b9e1aa8f652dc743f Affected
Linux Linux5.11 Affectedbefore 5.11 Not Affected6.12.119 through 6.12.* Not Affected6.18.65 through 6.18.* Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.