{"id":"CVE-2026-142802","summary":"platform/x86/amd: hfi: Fix a use-after-free when unloading the driver","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86/amd: hfi: Fix a use-after-free when unloading the driver\n\namd_hfi_probe() registers CPU hotplug callbacks with\ncpuhp_setup_state(CPUHP_AP_ONLINE_DYN, ...) and schedules the static\nsched_amd_hfi_itmt_work work item, but amd_hfi_remove() tears down\nneither.  The dynamically assigned hotplug state returned by\ncpuhp_setup_state() is discarded, so cpuhp_remove_state() can never be\ncalled, and the pending work is never cancelled.\n\nAfter the module is unloaded and its memory is freed, any subsequent CPU\nhotplug event or execution of the scheduled work dereferences the stale\ncallback and work function pointers, resulting in a use-after-free and\nkernel panic.\n\nStore the hotplug state returned by cpuhp_setup_state() and, on removal,\ncall cpuhp_remove_state() to unregister the callbacks and\ncancel_work_sync() to flush the scheduled work before the module memory\ngoes away.","modified":"2026-12-03T05:00:26.413851851Z","published":"2026-12-03T03:11:31.553Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142802.json","cna_assigner":"Linux"},"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/02b63c0227a3694b89133e3f17342a4ed083a348"},{"type":"WEB","url":"https://git.kernel.org/stable/c/55d8406dfa2fa8ad8ac2f053c2a53a97d8b0ce48"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ff2c27583cf9f4e009e30ca27b04f69bbc9b9674"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142802.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142802"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"bb20421c05fc0a0fd70a3f8af076319f7dec4cf1"},{"fixed":"ff2c27583cf9f4e009e30ca27b04f69bbc9b9674"},{"fixed":"02b63c0227a3694b89133e3f17342a4ed083a348"},{"fixed":"55d8406dfa2fa8ad8ac2f053c2a53a97d8b0ce48"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142802.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.17.0"},{"fixed":"6.18.61"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142802.json"}}],"schema_version":"1.9.2"}