{"id":"CVE-2022-50702","aliases":["CVE-2022-50702"],"related":[],"kind":"vulnerability","state":"published","title":"vdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nvdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init()\n\nInject fault while probing module, if device_register() fails in\nvdpasim_net_init() or vdpasim_blk_init(), but the refcount of kobject is\nnot decreased to 0, the name allocated in dev_set_name() is leaked.\nFix this by calling put_device(), so that name can be freed in\ncallback function kobject_cleanup().\n\n(vdpa_sim_net)\nunreferenced object 0xffff88807eebc370 (size 16):\n  comm \"modprobe\", pid 3848, jiffies 4362982860 (age 18.153s)\n  hex dump (first 16 bytes):\n    76 64 70 61 73 69 6d 5f 6e 65 74 00 6b 6b 6b a5  vdpasim_net.kkk.\n  backtrace:\n    [<ffffffff8174f19e>] __kmalloc_node_track_caller+0x4e/0x150\n    [<ffffffff81731d53>] kstrdup+0x33/0x60\n    [<ffffffff83a5d421>] kobject_set_name_vargs+0x41/0x110\n    [<ffffffff82d87aab>] dev_set_name+0xab/0xe0\n    [<ffffffff82d91a23>] device_add+0xe3/0x1a80\n    [<ffffffffa0270013>] 0xffffffffa0270013\n    [<ffffffff81001c27>] do_one_initcall+0x87/0x2e0\n    [<ffffffff813739cb>] do_init_module+0x1ab/0x640\n    [<ffffffff81379d20>] load_module+0x5d00/0x77f0\n    [<ffffffff8137bc40>] __do_sys_finit_module+0x110/0x1b0\n    [<ffffffff83c4d505>] do_syscall_64+0x35/0x80\n    [<ffffffff83e0006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0\n\n(vdpa_sim_blk)\nunreferenced object 0xffff8881070c1250 (size 16):\n  comm \"modprobe\", pid 6844, jiffies 4364069319 (age 17.572s)\n  hex dump (first 16 bytes):\n    76 64 70 61 73 69 6d 5f 62 6c 6b 00 6b 6b 6b a5  vdpasim_blk.kkk.\n  backtrace:\n    [<ffffffff8174f19e>] __kmalloc_node_track_caller+0x4e/0x150\n    [<ffffffff81731d53>] kstrdup+0x33/0x60\n    [<ffffffff83a5d421>] kobject_set_name_vargs+0x41/0x110\n    [<ffffffff82d87aab>] dev_set_name+0xab/0xe0\n    [<ffffffff82d91a23>] device_add+0xe3/0x1a80\n    [<ffffffffa0220013>] 0xffffffffa0220013\n    [<ffffffff81001c27>] do_one_initcall+0x87/0x2e0\n    [<ffffffff813739cb>] do_init_module+0x1ab/0x640\n    [<ffffffff81379d20>] load_module+0x5d00/0x77f0\n    [<ffffffff8137bc40>] __do_sys_finit_module+0x110/0x1b0\n    [<ffffffff83c4d505>] do_syscall_64+0x35/0x80\n    [<ffffffff83e0006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nvdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init()\n\nInject fault while probing module, if device_register() fails in\nvdpasim_net_init() or vdpasim_blk_init(), but the refcount of kobject is\nnot decreased to 0, the name allocated in dev_set_name() is leaked.\nFix this by calling put_device(), so that name can be freed in\ncallback function kobject_cleanup().\n\n(vdpa_sim_net)\nunreferenced object 0xffff88807eebc370 (size 16):\n  comm \"modprobe\", pid 3848, jiffies 4362982860 (age 18.153s)\n  hex dump (first 16 bytes):\n    76 64 70 61 73 69 6d 5f 6e 65 74 00 6b 6b 6b a5  vdpasim_net.kkk.\n  backtrace:\n    [<ffffffff8174f19e>] __kmalloc_node_track_caller+0x4e/0x150\n    [<ffffffff81731d53>] kstrdup+0x33/0x60\n    [<ffffffff83a5d421>] kobject_set_name_vargs+0x41/0x110\n    [<ffffffff82d87aab>] dev_set_name+0xab/0xe0\n    [<ffffffff82d91a23>] device_add+0xe3/0x1a80\n    [<ffffffffa0270013>] 0xffffffffa0270013\n    [<ffffffff81001c27>] do_one_initcall+0x87/0x2e0\n    [<ffffffff813739cb>] do_init_module+0x1ab/0x640\n    [<ffffffff81379d20>] load_module+0x5d00/0x77f0\n    [<ffffffff8137bc40>] __do_sys_finit_module+0x110/0x1b0\n    [<ffffffff83c4d505>] do_syscall_64+0x35/0x80\n    [<ffffffff83e0006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0\n\n(vdpa_sim_blk)\nunreferenced object 0xffff8881070c1250 (size 16):\n  comm \"modprobe\", pid 6844, jiffies 4364069319 (age 17.572s)\n  hex dump (first 16 bytes):\n    76 64 70 61 73 69 6d 5f 62 6c 6b 00 6b 6b 6b a5  vdpasim_blk.kkk.\n  backtrace:\n    [<ffffffff8174f19e>] __kmalloc_node_track_caller+0x4e/0x150\n    [<ffffffff81731d53>] kstrdup+0x33/0x60\n    [<ffffffff83a5d421>] kobject_set_name_vargs+0x41/0x110\n    [<ffffffff82d87aab>] dev_set_name+0xab/0xe0\n    [<ffffffff82d91a23>] device_add+0xe3/0x1a80\n    [<ffffffffa0220013>] 0xffffffffa0220013\n    [<ffffffff81001c27>] do_one_initcall+0x87/0x2e0\n    [<ffffffff813739cb>] do_init_module+0x1ab/0x640\n    [<ffffffff81379d20>] load_module+0x5d00/0x77f0\n    [<ffffffff8137bc40>] __do_sys_finit_module+0x110/0x1b0\n    [<ffffffff83c4d505>] do_syscall_64+0x35/0x80\n    [<ffffffff83e0006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha corregido la siguiente vulnerabilidad:\\n\\nvdpa_sim: corregir posible fuga de memoria en vdpasim_net_init() y vdpasim_blk_init()\\n\\nInyectar fallo al sondear el módulo; si device_register() falla en\\nvdpasim_net_init() o vdpasim_blk_init(), pero el recuento de referencias de kobject no se reduce a 0, el nombre asignado en dev_set_name() se pierde. Se corrige llamando a put_device(), de modo que el nombre pueda liberarse en la función de devolución de llamada kobject_cleanup().\\n\\n(vdpa_sim_net)\\nobjeto sin referencia 0xffff88807eebc370 (tamaño 16):\\n  comm \\“modprobe\\”, pid 3848, jiffies 4362982860 (edad 18.153?s)\\n  volcado hexadecimal (primeros 16 bytes):\\n    76 64 70 61 73 69 6d 5f 6e 65 74 00 6b 6b 6b a5  vdpasim_net.kkk.\\n  traza de pila:\\n    [[ffffffff8174f19e]] __kmalloc_node_track_caller+0x4e/0x150\\n    [[ffffffff81731d53]] kstrdup+0x33/0x60\\n    [[ffffffff83a5d421]] kobject_set_name_vargs+0x41/0x110\\n    [[ffffffff82d87aab]] dev_set_name+0xab/0xe0\\n    [[ffffffff82d91a23]] device_add+0xe3/0x1a80\\n    [[ffffffffa0270013]] 0xffffffffa0270013\\n    [[ffffffff81001c27]] do_one_initcall+0x87/0x2e0\\n    [[ffffffff813739cb]] do_init_module+0x1ab/0x640\\n    [[ffffffff81379d20]] load_module+0x5d00/0x77f0\\n    [[ffffffff8137bc40]] __do_sys_finit_module+0x110/0x1b0\\n    [[ffffffff83c4d505]] do_syscall_64+0x35/0x80\\n    [[ffffffff83e0006a]] entry_SYSCALL_64_after_hwframe+0x46/0xb0\\n\\n(vdpa_sim_blk)\\nobjeto sin referencia 0xffff8881070c1250 (tamaño 16):\\n  comm \\“modprobe\\”, pid 6844, jiffies 4364069319 (edad 17.572?s)\\n  volcado hexadecimal (primeros 16 bytes):\\n    76 64 70 61 73 69 6d 5f 62 6c 6b 00 6b 6b 6b a5  vdpasim_blk.kkk.\\n  traza de pila:\\n    [[ffffffff8174f19e]] __kmalloc_node_track_caller+0x4e/0x150\\n    [[ffffffff81731d53]] kstrdup+0x33/0x60\\n    [[ffffffff83a5d421]] kobject_set_name_vargs+0x41/0x110\\n    [[ffffffff82d87aab]] dev_set_name+0xab/0xe0\\n    [[ffffffff82d91a23]] device_add+0xe3/0x1a80\\n    [[ffffffffa0220013]] 0xffffffffa0220013\\n    [[ffffffff81001c27]] do_one_initcall+0x87/0x2e0\\n    [[ffffffff813739cb]] do_init_module+0x1ab/0x640\\n    [[ffffffff81379d20]] load_module+0x5d00/0x77f0\\n    [[ffffffff8137bc40]] __do_sys_finit_module+0x110/0x1b0\\n    [[ffffffff83c4d505]] do_syscall_64+0x35/0x80\\n    [[ffffffff83e0006a]] entry_SYSCALL_64_after_hwframe+0x46/0xb0","source":"nvd"}],"published":"2025-12-24T10:55:17.831Z","modified":"2026-11-10T12:10:00.177Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"a3c06ae158dd6fa8336157c31d9234689d068d02","fixed":"586e6fd7d581f987f7d0d2592edf0b26397e783e","status":"affected"},{"type":"git","introduced":"a3c06ae158dd6fa8336157c31d9234689d068d02","fixed":"5be953e353fe421f2983e1fd37f07fba97edbffc","status":"affected"},{"type":"git","introduced":"a3c06ae158dd6fa8336157c31d9234689d068d02","fixed":"337c24d817e28dd454ca22f1063dfad20822426e","status":"affected"},{"type":"git","introduced":"a3c06ae158dd6fa8336157c31d9234689d068d02","fixed":"aeca7ff254843d49a8739f07f7dab1341450111d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.12","status":"unaffected"},{"type":"semver","introduced":"5.15.87","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.19","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.5","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/586e6fd7d581f987f7d0d2592edf0b26397e783e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5be953e353fe421f2983e1fd37f07fba97edbffc","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/337c24d817e28dd454ca22f1063dfad20822426e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/aeca7ff254843d49a8739f07f7dab1341450111d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50702","url":"https://www.cve.org/CVERecord?id=CVE-2022-50702","licence":"CVE Terms of Use","modified":"2026-05-11T19:23:50.676Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50702","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50702","licence":"Public domain","modified":"2026-11-10T12:10:00.177Z"}],"updatedAt":"2026-11-25T22:58:21.325Z","epss":{"score":0.00214,"percentile":0.12562,"date":"2026-12-02T12:00:21.000Z"}}