{"id":"CVE-2024-26866","summary":"spi: lpspi: Avoid potential use-after-free in probe()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: lpspi: Avoid potential use-after-free in probe()\n\nfsl_lpspi_probe() is allocating/disposing memory manually with\nspi_alloc_host()/spi_alloc_target(), but uses\ndevm_spi_register_controller(). In case of error after the latter call the\nmemory will be explicitly freed in the probe function by\nspi_controller_put() call, but used afterwards by \"devm\" management outside\nprobe() (spi_unregister_controller() \u003c- devm_spi_unregister() below).\n\nUnable to handle kernel NULL pointer dereference at virtual address 0000000000000070\n...\nCall trace:\n kernfs_find_ns\n kernfs_find_and_get_ns\n sysfs_remove_group\n sysfs_remove_groups\n device_remove_attrs\n device_del\n spi_unregister_controller\n devm_spi_unregister\n release_nodes\n devres_release_all\n really_probe\n driver_probe_device\n __device_attach_driver\n bus_for_each_drv\n __device_attach\n device_initial_probe\n bus_probe_device\n deferred_probe_work_func\n process_one_work\n worker_thread\n kthread\n ret_from_fork","modified":"2026-04-02T10:06:14.630867Z","published":"2024-04-17T10:27:28.163Z","related":["SUSE-SU-2024:1644-1","SUSE-SU-2024:1659-1","SUSE-SU-2024:1663-1","SUSE-SU-2024:2135-1","SUSE-SU-2024:2203-1","SUSE-SU-2024:2973-1","SUSE-SU-2025:20008-1","SUSE-SU-2025:20028-1","SUSE-SU-2025:20166-1","SUSE-SU-2025:20249-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26866.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/1543418e82789cc383cd36d41469983c64e3fc7f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2ae0ab0143fcc06190713ed81a6486ed0ad3c861"},{"type":"WEB","url":"https://git.kernel.org/stable/c/996ce839606afd0fef91355627868022aa73eb68"},{"type":"WEB","url":"https://git.kernel.org/stable/c/da83ed350e4604b976e94239b08d8e2e7eaee7ea"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26866.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26866"},{"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":"5314987de5e5f5e38436ef4a69328bc472bbd63e"},{"fixed":"da83ed350e4604b976e94239b08d8e2e7eaee7ea"},{"fixed":"1543418e82789cc383cd36d41469983c64e3fc7f"},{"fixed":"996ce839606afd0fef91355627868022aa73eb68"},{"fixed":"2ae0ab0143fcc06190713ed81a6486ed0ad3c861"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26866.json"}}],"schema_version":"1.7.5"}