{"id":"CVE-2023-53594","aliases":["CVE-2023-53594"],"related":[],"kind":"vulnerability","state":"published","title":"driver core: fix resource leak in device_add()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: fix resource leak in device_add()\n\nWhen calling kobject_add() failed in device_add(), it will call\ncleanup_glue_dir() to free resource. But in kobject_add(),\ndev->kobj.parent has been set to NULL. This will cause resource leak.\n\nThe process is as follows:\ndevice_add()\n\tget_device_parent()\n\t\tclass_dir_create_and_add()\n\t\t\tkobject_add()\t\t//kobject_get()\n\t...\n\tdev->kobj.parent = kobj;\n\t...\n\tkobject_add()\t\t//failed, but set dev->kobj.parent = NULL\n\t...\n\tglue_dir = get_glue_dir(dev)\t//glue_dir = NULL, and goto\n\t\t\t\t\t//\"Error\" label\n\t...\n\tcleanup_glue_dir()\t//becaues glue_dir is NULL, not call\n\t\t\t\t//kobject_put()\n\nThe preceding problem may cause insmod mac80211_hwsim.ko to failed.\nsysfs: cannot create duplicate filename '/devices/virtual/mac80211_hwsim'\nCall Trace:\n<TASK>\ndump_stack_lvl+0x8e/0xd1\nsysfs_warn_dup.cold+0x1c/0x29\nsysfs_create_dir_ns+0x224/0x280\nkobject_add_internal+0x2aa/0x880\nkobject_add+0x135/0x1a0\nget_device_parent+0x3d7/0x590\ndevice_add+0x2aa/0x1cb0\ndevice_create_groups_vargs+0x1eb/0x260\ndevice_create+0xdc/0x110\nmac80211_hwsim_new_radio+0x31e/0x4790 [mac80211_hwsim]\ninit_mac80211_hwsim+0x48d/0x1000 [mac80211_hwsim]\ndo_one_initcall+0x10f/0x630\ndo_init_module+0x19f/0x5e0\nload_module+0x64b7/0x6eb0\n__do_sys_finit_module+0x140/0x200\ndo_syscall_64+0x35/0x80\nentry_SYSCALL_64_after_hwframe+0x46/0xb0\n</TASK>\nkobject_add_internal failed for mac80211_hwsim with -EEXIST, don't try to\nregister things with the same name in the same directory.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: fix resource leak in device_add()\n\nWhen calling kobject_add() failed in device_add(), it will call\ncleanup_glue_dir() to free resource. But in kobject_add(),\ndev->kobj.parent has been set to NULL. This will cause resource leak.\n\nThe process is as follows:\ndevice_add()\n\tget_device_parent()\n\t\tclass_dir_create_and_add()\n\t\t\tkobject_add()\t\t//kobject_get()\n\t...\n\tdev->kobj.parent = kobj;\n\t...\n\tkobject_add()\t\t//failed, but set dev->kobj.parent = NULL\n\t...\n\tglue_dir = get_glue_dir(dev)\t//glue_dir = NULL, and goto\n\t\t\t\t\t//\"Error\" label\n\t...\n\tcleanup_glue_dir()\t//becaues glue_dir is NULL, not call\n\t\t\t\t//kobject_put()\n\nThe preceding problem may cause insmod mac80211_hwsim.ko to failed.\nsysfs: cannot create duplicate filename '/devices/virtual/mac80211_hwsim'\nCall Trace:\n<TASK>\ndump_stack_lvl+0x8e/0xd1\nsysfs_warn_dup.cold+0x1c/0x29\nsysfs_create_dir_ns+0x224/0x280\nkobject_add_internal+0x2aa/0x880\nkobject_add+0x135/0x1a0\nget_device_parent+0x3d7/0x590\ndevice_add+0x2aa/0x1cb0\ndevice_create_groups_vargs+0x1eb/0x260\ndevice_create+0xdc/0x110\nmac80211_hwsim_new_radio+0x31e/0x4790 [mac80211_hwsim]\ninit_mac80211_hwsim+0x48d/0x1000 [mac80211_hwsim]\ndo_one_initcall+0x10f/0x630\ndo_init_module+0x19f/0x5e0\nload_module+0x64b7/0x6eb0\n__do_sys_finit_module+0x140/0x200\ndo_syscall_64+0x35/0x80\nentry_SYSCALL_64_after_hwframe+0x46/0xb0\n</TASK>\nkobject_add_internal failed for mac80211_hwsim with -EEXIST, don't try to\nregister things with the same name in the same directory.","source":"cvelist"}],"published":"2025-10-04T15:44:07.533Z","modified":"2026-11-05T21:17:27.610Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-401"],"affected":[{"ranges":[{"type":"git","introduced":"cebf8fd16900fdfd58c0028617944f808f97fe50","fixed":"8d389e363075c2e1deb84a560686ea92123e4b8b","status":"affected"},{"type":"git","introduced":"cebf8fd16900fdfd58c0028617944f808f97fe50","fixed":"d1dbff10c6cd3b43457f3efd3c9c4950009635bf","status":"affected"},{"type":"git","introduced":"cebf8fd16900fdfd58c0028617944f808f97fe50","fixed":"f39d21154db87545d8f0b25d13c326f37cc32239","status":"affected"},{"type":"git","introduced":"cebf8fd16900fdfd58c0028617944f808f97fe50","fixed":"6977b1a5d67097eaa4d02b0c126c04cc6e8917c0","status":"affected"},{"type":"git","version":"e7f6e3c9db4b6f259c89fd05728d024ab32acd71","status":"affected"},{"type":"git","version":"a93a63333dbdb182b87e8cc99df8b4474f867acb","status":"affected"},{"type":"git","version":"37de955c11b59050346e530143c20b10b4846527","status":"affected"},{"type":"git","version":"645897231f960590220144b06d1f994b7eb88326","status":"affected"},{"type":"semver","introduced":"3.10.105","fixed":"3.11","status":"affected"},{"type":"semver","introduced":"3.12.70","fixed":"3.13","status":"affected"},{"type":"semver","introduced":"4.4.40","fixed":"4.5","status":"affected"},{"type":"semver","introduced":"4.8.16","fixed":"4.9","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.9","status":"unaffected"},{"type":"semver","introduced":"5.15.99","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.16","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.2.3","lastAffected":"6.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.10.105","fixed":"3.11"},{"status":"affected","introduced":"3.12.70","fixed":"3.13"},{"status":"affected","introduced":"4.4.40","fixed":"4.5"},{"status":"affected","introduced":"4.8.16","fixed":"5.15.99"},{"status":"affected","introduced":"5.16","fixed":"6.1.16"},{"status":"affected","introduced":"6.2","fixed":"6.2.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/8d389e363075c2e1deb84a560686ea92123e4b8b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d1dbff10c6cd3b43457f3efd3c9c4950009635bf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f39d21154db87545d8f0b25d13c326f37cc32239","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6977b1a5d67097eaa4d02b0c126c04cc6e8917c0","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T20:24:49.348Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-53594","url":"https://www.cve.org/CVERecord?id=CVE-2023-53594","licence":"CVE Terms of Use","modified":"2026-11-05T20:31:16.299Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-53594","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53594","licence":"Public domain","modified":"2026-11-05T21:17:27.610Z"}],"updatedAt":"2026-11-25T22:58:34.958Z","epss":{"score":0.00149,"percentile":0.0427,"date":"2026-12-01T12:00:22.000Z"}}