cvelo
P4 · InfoEPSS 0.4%

platform/x86/amd/pmf: Fix power_supply refcount leak in amd_pmf_get_battery_prop()

  • CVE-2026-142838
  • GHSA-c4r9-hfxq-qrpq
  • EUVD-2026-142088

Description

In the Linux kernel, the following vulnerability has been resolved: platform/x86/amd/pmf: Fix power_supply refcount leak in amd_pmf_get_battery_prop() power_supply_get_by_name() takes a reference that is only dropped on the error path. On success it leaks, five times per policy evaluation. Unregistering the battery later trips the use_cnt WARN_ON in power_supply_unregister() and never frees it. While here, return -ENODEV instead of an uninitialised 'value' when no battery matches, and stop at the first supply found rather than letting the last one in the table win. Found by reading the code. Fix and changelog drafted with Claude Code (Fable 5.1) and reviewed by hand. Compile-tested only (allmodconfig, W=1, sparse); not run on Smart PC hardware.

Text from the CVE.org record.

Recommendation

No source states a fixed version. Check the vendor advisory.

Affected

  • Linux

    Affected versionsFixed in
    6.8none stated
    before 6.8: not affectednone stated
    from 6.12.117 up to 6.12.*: not affectednone stated
    from 6.18.63 up to 6.18.*: not affectednone stated
    from 7.3.4 up to 7.3.*: not affectednone stated
    from 7.4-rc1 onwards: not affectednone stated

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.