{"cve":"CVE-2022-50342","nvd":{"published":"2025-09-16T17:15:33.807","modified":"2026-06-17T05:23:16.460","status":"Modified","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nfloppy: Fix memory leak in do_floppy_init()\n\nA memory leak was reported when floppy_alloc_disk() failed in\ndo_floppy_init().\n\nunreferenced object 0xffff888115ed25a0 (size 8):\n  comm \"modprobe\", pid 727, jiffies 4295051278 (age 25.529s)\n  hex dump (first 8 bytes):\n    00 ac 67 5b 81 88 ff ff                          ..g[....\n  backtrace:\n    [<000000007f457abb>] __kmalloc_node+0x4c/0xc0\n    [<00000000a87bfa9e>] blk_mq_realloc_tag_set_tags.part.0+0x6f/0x180\n    [<000000006f02e8b1>] blk_mq_alloc_tag_set+0x573/0x1130\n    [<0000000066007fd7>] 0xffffffffc06b8b08\n    [<0000000081f5ac40>] do_one_initcall+0xd0/0x4f0\n    [<00000000e26d04ee>] do_init_module+0x1a4/0x680\n    [<000000001bb22407>] load_module+0x6249/0x7110\n    [<00000000ad31ac4d>] __do_sys_finit_module+0x140/0x200\n    [<000000007bddca46>] do_syscall_64+0x35/0x80\n    [<00000000b5afec39>] entry_SYSCALL_64_after_hwframe+0x46/0xb0\nunreferenced object 0xffff88810fc30540 (size 32):\n  comm \"modprobe\", pid 727, jiffies 4295051278 (age 25.529s)\n  hex dump (first 32 bytes):\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\n  backtrace:\n    [<000000007f457abb>] __kmalloc_node+0x4c/0xc0\n    [<000000006b91eab4>] blk_mq_alloc_tag_set+0x393/0x1130\n    [<0000000066007fd7>] 0xffffffffc06b8b08\n    [<0000000081f5ac40>] do_one_initcall+0xd0/0x4f0\n    [<00000000e26d04ee>] do_init_module+0x1a4/0x680\n    [<000000001bb22407>] load_module+0x6249/0x7110\n    [<00000000ad31ac4d>] __do_sys_finit_module+0x140/0x200\n    [<000000007bddca46>] do_syscall_64+0x35/0x80\n    [<00000000b5afec39>] entry_SYSCALL_64_after_hwframe+0x46/0xb0\n\nIf the floppy_alloc_disk() failed, disks of current drive will not be set,\nthus the lastest allocated set->tag cannot be freed in the error handling\npath. A simple call graph shown as below:\n\n floppy_module_init()\n   floppy_init()\n     do_floppy_init()\n       for (drive = 0; drive < N_DRIVE; drive++)\n         blk_mq_alloc_tag_set()\n           blk_mq_alloc_tag_set_tags()\n             blk_mq_realloc_tag_set_tags() # set->tag allocated\n         floppy_alloc_disk()\n           blk_mq_alloc_disk() # error occurred, disks failed to allocated\n\n       ->out_put_disk:\n       for (drive = 0; drive < N_DRIVE; drive++)\n         if (!disks[drive][0]) # the last disks is not set and loop break\n           break;\n         blk_mq_free_tag_set() # the latest allocated set->tag leaked\n\nFix this problem by free the set->tag of current drive before jump to\nerror handling path.\n\n[efremov: added stable list, changed title]","cvss_v4":null,"cvss_v3":{"version":"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},"cwes":["CWE-401"],"references":["https://git.kernel.org/stable/c/55b3c66a0d441cd37154ae95e44d0b82ccfd580e","https://git.kernel.org/stable/c/75d8c8851a4da0190c2480e84315b5fd3d0356c5","https://git.kernel.org/stable/c/f36d8c8651506aea5f09899f5356ece5d1384f50","https://git.kernel.org/stable/c/f8ace2e304c5dd8a7328db9cd2b8a4b1b98d83ec"],"products":["linux:linux_kernel"],"source":"nvd","synced_at":"2026-10-19T22:10:08.713834912+00:00"},"epss":{"cve":"CVE-2022-50342","score":0.00159,"percentile":0.04999,"date":"2026-10-31"},"kev":null,"osv":[],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}