CVE-2023-53594

Source
https://cve.org/CVERecord?id=CVE-2023-53594
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53594.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-53594
Downstream
Related
Published
2025-10-04T15:44:07.533Z
Modified
2026-03-20T11:20:36.535863Z
Summary
driver core: fix resource leak in device_add()
Details

In the Linux kernel, the following vulnerability has been resolved:

driver core: fix resource leak in device_add()

When calling kobjectadd() failed in deviceadd(), it will call cleanupgluedir() 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: deviceadd() getdeviceparent() classdircreateandadd() kobjectadd() //kobjectget() ... dev->kobj.parent = kobj; ... kobjectadd() //failed, but set dev->kobj.parent = NULL ... gluedir = getgluedir(dev) //gluedir = NULL, and goto //"Error" label ... cleanupgluedir() //becaues gluedir is NULL, not call //kobjectput()

The preceding problem may cause insmod mac80211hwsim.ko to failed. sysfs: cannot create duplicate filename '/devices/virtual/mac80211hwsim' Call Trace: <TASK> dumpstacklvl+0x8e/0xd1 sysfswarndup.cold+0x1c/0x29 sysfscreatedirns+0x224/0x280 kobjectaddinternal+0x2aa/0x880 kobjectadd+0x135/0x1a0 getdeviceparent+0x3d7/0x590 deviceadd+0x2aa/0x1cb0 devicecreategroupsvargs+0x1eb/0x260 devicecreate+0xdc/0x110 mac80211hwsimnewradio+0x31e/0x4790 [mac80211hwsim] initmac80211hwsim+0x48d/0x1000 [mac80211hwsim] dooneinitcall+0x10f/0x630 doinitmodule+0x19f/0x5e0 load_module+0x64b7/0x6eb0 __dosysfinitmodule+0x140/0x200 dosyscall64+0x35/0x80 entrySYSCALL64afterhwframe+0x46/0xb0 </TASK> kobjectaddinternal failed for mac80211hwsim with -EEXIST, don't try to register things with the same name in the same directory.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53594.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / 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
cebf8fd16900fdfd58c0028617944f808f97fe50
Fixed
8d389e363075c2e1deb84a560686ea92123e4b8b
Fixed
d1dbff10c6cd3b43457f3efd3c9c4950009635bf
Fixed
f39d21154db87545d8f0b25d13c326f37cc32239
Fixed
6977b1a5d67097eaa4d02b0c126c04cc6e8917c0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
e7f6e3c9db4b6f259c89fd05728d024ab32acd71
Last affected
a93a63333dbdb182b87e8cc99df8b4474f867acb
Last affected
37de955c11b59050346e530143c20b10b4846527
Last affected
645897231f960590220144b06d1f994b7eb88326

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53594.json"