{"id":"CVE-2026-99518","summary":"platform/x86: asus-wmi: fix use-after-free unregistering kbd_led led","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86: asus-wmi: fix use-after-free unregistering kbd_led led\n\nkbd_led_update_all() registers asus-\u003ekbd_led with\ndevm_led_classdev_register() on the platform device, but kbd_led is\nembedded in struct asus_wmi, which asus_wmi_remove() frees at its end.\nThe driver core calls .remove() before devres_release_all(), so the\ndeferred devres release runs led_classdev_unregister() on memory that\nhas already been freed. Whether that faults depends on whether the\nslab has been reused in between, which makes the crash on module\nunload intermittent and silently corrupts the led classdev state in\nthe remaining runs.\n\nUnregister the led classdev explicitly in asus_wmi_led_exit(), after\nthe led workqueue has been destroyed: kbd_led_work can then neither\nrun nor be queued anymore, since asus_ref.asus is NULL too, so\nkbd_led_registered is stable and the classdev can be released while\nthe memory embedding it is still alive. devm_led_classdev_unregister()\nalso drops the devres entry, leaving nothing to run at unbind cleanup\ntime; it warns when no devres entry exists, hence the\nkbd_led_registered check.","modified":"2026-11-19T17:01:26.781982909Z","published":"2026-11-19T14:44:22.840Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99518.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/465f3074762ad943370881d7b6f096e70d9a5a5a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/639bc2254816b7c4e7a9801a7b3aa71bfa3f915c"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99518.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99518"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"fac55d29581fcd4c3b66b9c2b9f7995c459c0064"},{"fixed":"465f3074762ad943370881d7b6f096e70d9a5a5a"},{"fixed":"639bc2254816b7c4e7a9801a7b3aa71bfa3f915c"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99518.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.0.0"},{"fixed":"7.3.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99518.json"}}],"schema_version":"1.9.2"}