{"id":"CVE-2026-142838","summary":"platform/x86/amd/pmf: Fix power_supply refcount leak in amd_pmf_get_battery_prop()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86/amd/pmf: Fix power_supply refcount leak in amd_pmf_get_battery_prop()\n\npower_supply_get_by_name() takes a reference that is only dropped on\nthe error path. On success it leaks, five times per policy evaluation.\nUnregistering the battery later trips the use_cnt WARN_ON in\npower_supply_unregister() and never frees it.\n\nWhile here, return -ENODEV instead of an uninitialised 'value' when\nno battery matches, and stop at the first supply found rather than\nletting the last one in the table win.\n\nFound by reading the code. Fix and changelog drafted with Claude Code\n(Fable 5.1) and reviewed by hand. Compile-tested only (allmodconfig,\nW=1, sparse); not run on Smart PC hardware.","modified":"2026-12-03T05:00:56.303274831Z","published":"2026-12-03T03:20:50.988Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142838.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3857d41c7d4db8ad2a6891e3a88ba6e8ef56e075"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7e24cff8bb8147ddc4ca401255e3bfa6bbf1dea4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9f3eebbbd1033de0abcc2694ba4b455d30fe33f9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f883de7f96c5748bd6f834c4afdedb7142315574"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142838.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142838"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f4627dfd0e1924ad31c6476c0fc2308cfe12b561"},{"fixed":"f883de7f96c5748bd6f834c4afdedb7142315574"},{"fixed":"3857d41c7d4db8ad2a6891e3a88ba6e8ef56e075"},{"fixed":"7e24cff8bb8147ddc4ca401255e3bfa6bbf1dea4"},{"fixed":"9f3eebbbd1033de0abcc2694ba4b455d30fe33f9"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142838.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.8.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142838.json"}}],"schema_version":"1.9.2"}