{"id":"CVE-2024-47688","summary":"driver core: Fix a potential null-ptr-deref in module_add_driver()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: Fix a potential null-ptr-deref in module_add_driver()\n\nInject fault while probing of-fpga-region, if kasprintf() fails in\nmodule_add_driver(), the second sysfs_remove_link() in exit path will cause\nnull-ptr-deref as below because kernfs_name_hash() will call strlen() with\nNULL driver_name.\n\nFix it by releasing resources based on the exit path sequence.\n\n\t KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]\n\t Mem abort info:\n\t   ESR = 0x0000000096000005\n\t   EC = 0x25: DABT (current EL), IL = 32 bits\n\t   SET = 0, FnV = 0\n\t   EA = 0, S1PTW = 0\n\t   FSC = 0x05: level 1 translation fault\n\t Data abort info:\n\t   ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000\n\t   CM = 0, WnR = 0, TnD = 0, TagAccess = 0\n\t   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0\n\t [dfffffc000000000] address between user and kernel address ranges\n\t Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP\n\t Dumping ftrace buffer:\n\t    (ftrace buffer empty)\n\t Modules linked in: of_fpga_region(+) fpga_region fpga_bridge cfg80211 rfkill 8021q garp mrp stp llc ipv6 [last unloaded: of_fpga_region]\n\t CPU: 2 UID: 0 PID: 2036 Comm: modprobe Not tainted 6.11.0-rc2-g6a0e38264012 #295\n\t Hardware name: linux,dummy-virt (DT)\n\t pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n\t pc : strlen+0x24/0xb0\n\t lr : kernfs_name_hash+0x1c/0xc4\n\t sp : ffffffc081f97380\n\t x29: ffffffc081f97380 x28: ffffffc081f97b90 x27: ffffff80c821c2a0\n\t x26: ffffffedac0be418 x25: 0000000000000000 x24: ffffff80c09d2000\n\t x23: 0000000000000000 x22: 0000000000000000 x21: 0000000000000000\n\t x20: 0000000000000000 x19: 0000000000000000 x18: 0000000000001840\n\t x17: 0000000000000000 x16: 0000000000000000 x15: 1ffffff8103f2e42\n\t x14: 00000000f1f1f1f1 x13: 0000000000000004 x12: ffffffb01812d61d\n\t x11: 1ffffff01812d61c x10: ffffffb01812d61c x9 : dfffffc000000000\n\t x8 : 0000004fe7ed29e4 x7 : ffffff80c096b0e7 x6 : 0000000000000001\n\t x5 : ffffff80c096b0e0 x4 : 1ffffffdb990efa2 x3 : 0000000000000000\n\t x2 : 0000000000000000 x1 : dfffffc000000000 x0 : 0000000000000000\n\t Call trace:\n\t  strlen+0x24/0xb0\n\t  kernfs_name_hash+0x1c/0xc4\n\t  kernfs_find_ns+0x118/0x2e8\n\t  kernfs_remove_by_name_ns+0x80/0x100\n\t  sysfs_remove_link+0x74/0xa8\n\t  module_add_driver+0x278/0x394\n\t  bus_add_driver+0x1f0/0x43c\n\t  driver_register+0xf4/0x3c0\n\t  __platform_driver_register+0x60/0x88\n\t  of_fpga_region_init+0x20/0x1000 [of_fpga_region]\n\t  do_one_initcall+0x110/0x788\n\t  do_init_module+0x1dc/0x5c8\n\t  load_module+0x3c38/0x4cac\n\t  init_module_from_file+0xd4/0x128\n\t  idempotent_init_module+0x2cc/0x528\n\t  __arm64_sys_finit_module+0xac/0x100\n\t  invoke_syscall+0x6c/0x258\n\t  el0_svc_common.constprop.0+0x160/0x22c\n\t  do_el0_svc+0x44/0x5c\n\t  el0_svc+0x48/0xb8\n\t  el0t_64_sync_handler+0x13c/0x158\n\t  el0t_64_sync+0x190/0x194\n\t Code: f2fbffe1 a90157f4 12000802 aa0003f5 (38e16861)\n\t ---[ end trace 0000000000000000 ]---\n\t Kernel panic - not syncing: Oops: Fatal exception","modified":"2026-04-16T04:39:21.011736850Z","published":"2024-10-21T11:53:28.526Z","related":["SUSE-SU-2024:3984-1","SUSE-SU-2024:3986-1","SUSE-SU-2024:4318-1","SUSE-SU-2024:4387-1","SUSE-SU-2025:20163-1","SUSE-SU-2025:20164-1","SUSE-SU-2025:20246-1","SUSE-SU-2025:20247-1","USN-7276-1","USN-7277-1","openSUSE-SU-2024:14500-1","openSUSE-SU-2025:14705-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47688.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/18ec12c97b39ff6aa15beb8d2b25d15cd44b87d8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4b5d48b7a29cc6d508121a4b4e0c97a891e5273c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b8e45b910525704010d10c9dcbf2abf3005aa97c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dcb9d581dee4c23f2378b6650511ece80dda4e2f"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47688.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47688"},{"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":"28f5a08600d0ea6831629d450193c4045094e729"},{"fixed":"b8e45b910525704010d10c9dcbf2abf3005aa97c"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"85d2b0aa170351380be39fe4ff7973df1427fe76"},{"fixed":"4b5d48b7a29cc6d508121a4b4e0c97a891e5273c"},{"fixed":"dcb9d581dee4c23f2378b6650511ece80dda4e2f"},{"fixed":"18ec12c97b39ff6aa15beb8d2b25d15cd44b87d8"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"51dacb1b0467b616463a334cbcd048f5710ba2aa"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-47688.json"}}],"schema_version":"1.7.5"}