{"id":"CVE-2026-45936","summary":"power: supply: goldfish: Fix use-after-free in power_supply_changed()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\npower: supply: goldfish: Fix use-after-free in power_supply_changed()\n\nUsing the `devm_` variant for requesting IRQ _before_ the `devm_`\nvariant for allocating/registering the `power_supply` handle, means that\nthe `power_supply` handle will be deallocated/unregistered _before_ the\ninterrupt handler (since `devm_` naturally deallocates in reverse\nallocation order). This means that during removal, there is a race\ncondition where an interrupt can fire just _after_ the `power_supply`\nhandle has been freed, *but* just _before_ the corresponding\nunregistration of the IRQ handler has run.\n\nThis will lead to the IRQ handler calling `power_supply_changed()` with\na freed `power_supply` handle. Which usually crashes the system or\notherwise silently corrupts the memory...\n\nNote that there is a similar situation which can also happen during\n`probe()`; the possibility of an interrupt firing _before_ registering\nthe `power_supply` handle. This would then lead to the nasty situation\nof using the `power_supply` handle *uninitialized* in\n`power_supply_changed()`.\n\nFix this racy use-after-free by making sure the IRQ is requested _after_\nthe registration of the `power_supply` handle.","modified":"2026-06-26T11:56:04.522120207Z","published":"2026-05-27T12:17:53.451Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45936.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0b29ffe4090a3fc7a7649de20e1eb1e53adddac7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/33751e28842bf5aee5ef7b2b8d5e456a069095cb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4350505e82b4f972ddb788e1c712c557c38859d0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/589d4fe56713c6344cd9f8939f9c7621c85f0966"},{"type":"WEB","url":"https://git.kernel.org/stable/c/77ea437faa4c06362e3ecfd2d7264eaa7ac1e82c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8c89aade8335e26a6a7dcda18992d15f51943927"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b2ce982e2e0c888dc55c888ad0e20ea04daf2e6b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bad8b61eb5059acd88349680e47839342dc89e94"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45936.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45936"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"84d7b768748943db2bb658b43931fdab04c224cc"},{"fixed":"589d4fe56713c6344cd9f8939f9c7621c85f0966"},{"fixed":"bad8b61eb5059acd88349680e47839342dc89e94"},{"fixed":"33751e28842bf5aee5ef7b2b8d5e456a069095cb"},{"fixed":"77ea437faa4c06362e3ecfd2d7264eaa7ac1e82c"},{"fixed":"4350505e82b4f972ddb788e1c712c557c38859d0"},{"fixed":"8c89aade8335e26a6a7dcda18992d15f51943927"},{"fixed":"0b29ffe4090a3fc7a7649de20e1eb1e53adddac7"},{"fixed":"b2ce982e2e0c888dc55c888ad0e20ea04daf2e6b"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-45936.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.9.0"},{"fixed":"5.10.252"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.202"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.165"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.128"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.75"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.14"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"6.19.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-45936.json"}}],"schema_version":"1.7.5"}