CVE-2026-139417

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

Published Nov 30, 2026 CVSS 3.1 · 4.4 Medium EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The Linux kernel driver for the AMD Performance Monitoring Counters (PMC) mismanages memory‑mapped I/O pointers by not clearing them when the driver is unbound. When the driver is rebound, the stale pointers are reused, causing the kernel to read from unmapped addresses through memcpy_fromio() and ioread32(). This results in a use‑after‑unmap crash of the kernel, which can fault the entire system.

Affected Systems

The affected product is the Linux kernel, all versions that include the amd_pmc driver before the fixes referenced in the provided repository commits. No specific version ranges are listed, so any kernel built with the buggy driver may be vulnerable.

Risk and Exploitability

The vulnerability is local; it requires the ability to unload and reload a kernel module that uses the AMD PMC driver, a capability typically restricted to privileged users. While no exploit code is known and the issue is not listed in CISA’s KEV catalog, the EPSS score is not available. The risk is therefore primarily a potential for a Denial of Service via kernel crash rather than remote code execution. Administrators should treat the vulnerability as moderate to high risk for environments that rely on the AMD PMC driver for performance monitoring.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest stable Linux kernel release that includes the patch clearing AMD PMC pointers on remove (see https://git.kernel.org/stable/c/3933c18b616acfb790e4dd3157c6aee6fe4d83ec for the commit).
  • If a kernel update is not immediately possible, disable the amd_pmc driver module by setting blacklist=amd_pmc in modprobe.d configuration to prevent the stale pointer scenario.
  • After applying the fix or disabling the module, monitor system logs for any unexpected module loading or kernel panics related to PMU access.

Generated by OpenCVE AI on December 1, 2026 at 05:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
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.
Title platform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:34 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:34 PM