{"id":"CVE-2022-49902","published":"2025-05-01T14:10:47Z","modified":"2026-05-11T19:08:56Z","title":"block: Fix possible memory leak for rq_wb on add_disk failure","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: Fix possible memory leak for rq_wb on add_disk failure\n\nkmemleak reported memory leaks in device_add_disk():\n\nkmemleak: 3 new suspected memory leaks\n\nunreferenced object 0xffff88800f420800 (size 512):\n  comm \"modprobe\", pid 4275, jiffies 4295639067 (age 223.512s)\n  hex dump (first 32 bytes):\n    04 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00  ................\n    00 e1 f5 05 00 00 00 00 00 00 00 00 00 00 00 00  ................\n  backtrace:\n    [<00000000d3662699>] kmalloc_trace+0x26/0x60\n    [<00000000edc7aadc>] wbt_init+0x50/0x6f0\n    [<0000000069601d16>] wbt_enable_default+0x157/0x1c0\n    [<0000000028fc393f>] blk_register_queue+0x2a4/0x420\n    [<000000007345a042>] device_add_disk+0x6fd/0xe40\n    [<0000000060e6aab0>] nbd_dev_add+0x828/0xbf0 [nbd]\n    ...\n\nIt is because the memory allocated in wbt_enable_default() is not\nreleased in device_add_disk() error path.\nNormally, these memory are freed in:\n\ndel_gendisk()\n  rq_qos_exit()\n    rqos->ops->exit(rqos);\n      wbt_exit()\n\nSo rq_qos_exit() is called to free the rq_wb memory for wbt_init().\nHowever in the error path of device_add_disk(), only\nblk_unregister_queue() is called and make rq_wb memory leaked.\n\nAdd rq_qos_exit() to the error path to fix it.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00199,"percentile":0.09914,"provenance":"source"},"cwes":[{"id":"CWE-401","name":"Missing Release of Memory after Effective Lifetime"}],"references":[{"url":"https://git.kernel.org/stable/c/4e68c5da60cd79950bd56287ae80b39d6261f995","tags":[]},{"url":"https://git.kernel.org/stable/c/528677d3b4af985445bd4ac667485ded1ed11220","tags":[]},{"url":"https://git.kernel.org/stable/c/fa81cbafbf5764ad5053512152345fab37a1fe18","tags":[]}],"priority":{"score":5.8,"factors":[{"name":"EPSS percentile","points":1.98},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, < 4e68c5da60cd79950bd56287ae80b39d6261f995",">= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, < 528677d3b4af985445bd4ac667485ded1ed11220",">= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, < fa81cbafbf5764ad5053512152345fab37a1fe18"]},{"vendor":"Linux","product":"Linux","versions":["5.15"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-10-01T14:59:03.595609Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-12871","exploited":false,"provenance":"source"}}