CVE-2023-53594

driver core: fix resource leak in device_add()

MEDIUM
5.5
CVSS Score
Published: October 4, 2025 at 03:44 PM UTC
Updated: June 17, 2026 at 06:45 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.1%

Description

In the Linux kernel, the following vulnerability has been resolved: driver core: fix resource leak in device_add() When calling kobject_add() failed in device_add(), it will call cleanup_glue_dir() to free resource. But in kobject_add(), dev->kobj.parent has been set to NULL. This will cause resource leak. The process is as follows: device_add() get_device_parent() class_dir_create_and_add() kobject_add() //kobject_get() ... dev->kobj.parent = kobj; ... kobject_add() //failed, but set dev->kobj.parent = NULL ... glue_dir = get_glue_dir(dev) //glue_dir = NULL, and goto //"Error" label ... cleanup_glue_dir() //becaues glue_dir is NULL, not call //kobject_put() The preceding problem may cause insmod mac80211_hwsim.ko to failed. sysfs: cannot create duplicate filename '/devices/virtual/mac80211_hwsim' Call Trace: <TASK> dump_stack_lvl+0x8e/0xd1 sysfs_warn_dup.cold+0x1c/0x29 sysfs_create_dir_ns+0x224/0x280 kobject_add_internal+0x2aa/0x880 kobject_add+0x135/0x1a0 get_device_parent+0x3d7/0x590 device_add+0x2aa/0x1cb0 device_create_groups_vargs+0x1eb/0x260 device_create+0xdc/0x110 mac80211_hwsim_new_radio+0x31e/0x4790 [mac80211_hwsim] init_mac80211_hwsim+0x48d/0x1000 [mac80211_hwsim] do_one_initcall+0x10f/0x630 do_init_module+0x19f/0x5e0 load_module+0x64b7/0x6eb0 __do_sys_finit_module+0x140/0x200 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 </TASK> kobject_add_internal failed for mac80211_hwsim with -EEXIST, don't try to register things with the same name in the same directory.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 3.10.105v ≥ 3.12.70v ≥ 4.4.40v ≥ 4.8.163.10.105 ≤ v < 3.113.12.70 ≤ v < 3.134.4.40 ≤ v < 4.54.8.16 ≤ v < 4.94.8.16 ≤ v < 5.15.994.9 ≤ v < 5.15.994.9 ≤ v < 6.1.164.9 ≤ v < 6.2.34.9 ≤ v < 6.35.16 ≤ v < 6.1.166.2 ≤ v < 6.2.33.10.1053.12.7037de955c11b59050346e530143c20b10b48465274.4.404.8.164.9645897231f960590220144b06d1f994b7eb88326a93a63333dbdb182b87e8cc99df8b4474f867acbcebf8fd16900fdfd58c0028617944f808f97fe50e7f6e3c9db4b6f259c89fd05728d024ab32acd71
Vendor states this is fixed in 6977b1a5d67097eaa4d02b0c126c04cc6e8917c0 (fixed)
Vendor states this is fixed in 8d389e363075c2e1deb84a560686ea92123e4b8b (fixed)
Vendor states this is fixed in d1dbff10c6cd3b43457f3efd3c9c4950009635bf (fixed)
Vendor states this is fixed in f39d21154db87545d8f0b25d13c326f37cc32239 (fixed)
Affected range stops below 3.11, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.13, so it looks safe — our inference, not a vendor statement
Affected range stops below 4.5, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 4.9 (unaffected)
Vendor states this is fixed in 5.15.99 (unaffected)
Vendor states this is fixed in 6.1.16 (unaffected)
Vendor states this is fixed in 6.2.3 (unaffected)
Vendor states this is fixed in 6.3 (unaffected)

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card