{"id":"CVE-2022-50331","summary":"wwan_hwsim: fix possible memory leak in wwan_hwsim_dev_new()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nwwan_hwsim: fix possible memory leak in wwan_hwsim_dev_new()\n\nInject fault while probing module, if device_register() fails,\nbut the refcount of kobject is not decreased to 0, the name\nallocated in dev_set_name() is leaked. Fix this by calling\nput_device(), so that name can be freed in callback function\nkobject_cleanup().\n\nunreferenced object 0xffff88810152ad20 (size 8):\n  comm \"modprobe\", pid 252, jiffies 4294849206 (age 22.713s)\n  hex dump (first 8 bytes):\n    68 77 73 69 6d 30 00 ff                          hwsim0..\n  backtrace:\n    [\u003c000000009c3504ed\u003e] __kmalloc_node_track_caller+0x44/0x1b0\n    [\u003c00000000c0228a5e\u003e] kvasprintf+0xb5/0x140\n    [\u003c00000000cff8c21f\u003e] kvasprintf_const+0x55/0x180\n    [\u003c0000000055a1e073\u003e] kobject_set_name_vargs+0x56/0x150\n    [\u003c000000000a80b139\u003e] dev_set_name+0xab/0xe0","modified":"2026-04-02T08:28:25.266983Z","published":"2025-09-15T14:49:41.415Z","related":["SUSE-SU-2025:03615-1","SUSE-SU-2025:03628-1","SUSE-SU-2025:3716-1","SUSE-SU-2025:3761-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50331.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/258ad2fe5ede773625adfda88b173f4123e59f45"},{"type":"WEB","url":"https://git.kernel.org/stable/c/50c31fa952309536c6e4461ff815ddccc8dff9d5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d87973314aba6de80a49f4271dd9be4ddc08e729"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50331.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50331"},{"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":"f36a111a74e71edbba27d4c0cf3d7bbccc172108"},{"fixed":"50c31fa952309536c6e4461ff815ddccc8dff9d5"},{"fixed":"d87973314aba6de80a49f4271dd9be4ddc08e729"},{"fixed":"258ad2fe5ede773625adfda88b173f4123e59f45"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50331.json"}}],"schema_version":"1.7.5"}