CVE-2022-49902: block: Fix possible memory leak for rq_wb on add_disk failure

Published May 1, 2025
·
Updated

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

block: Fix possible memory leak for rqwb on adddisk failure

kmemleak reported memory leaks in deviceadddisk():

kmemleak: 3 new suspected memory leaks

unreferenced object 0xffff88800f420800 (size 512): comm "modprobe", pid 4275, jiffies 4295639067 (age 223.512s) hex dump (first 32 bytes): 04 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 ................ 00 e1 f5 05 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000d3662699>] kmalloctrace+0x26/0x60 [<00000000edc7aadc>] wbtinit+0x50/0x6f0 [<0000000069601d16>] wbtenabledefault+0x157/0x1c0 [<0000000028fc393f>] blkregisterqueue+0x2a4/0x420 [<000000007345a042>] deviceadddisk+0x6fd/0xe40 [<0000000060e6aab0>] nbddevadd+0x828/0xbf0 [nbd] ...

It is because the memory allocated in wbtenabledefault() is not released in deviceadddisk() error path. Normally, these memory are freed in:

delgendisk() rqqosexit() rqos->ops->exit(rqos); wbtexit()

So rqqosexit() is called to free the rqwb memory for wbtinit(). However in the error path of deviceadddisk(), only blkunregisterqueue() is called and make rqwb memory leaked.

Add rqqosexit() to the error path to fix it.

Affected Software

6 affected components
Linux Linux kernel
Linux Linux kernel>=5.15<5.15.78
Linux Linux kernel>=5.16<6.0.8
Linux Linux kernel=6.1-rc1
Linux Linux kernel=6.1-rc2
Linux Linux kernel=6.1-rc3

Event History

May 1, 2025
CVE Published
via MITRE·02:10 PM
Data Sourced
via MITRE·02:10 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-49902?

CVE-2022-49902 has been classified as a low severity vulnerability.

2

How do I fix CVE-2022-49902?

You can resolve CVE-2022-49902 by applying the latest updates to the Linux kernel that address the memory leak issue.

3

Which versions of Linux Kernel are affected by CVE-2022-49902?

CVE-2022-49902 affects certain versions of the Linux kernel prior to the fix being applied.

4

What type of vulnerability is CVE-2022-49902?

CVE-2022-49902 is a memory leak vulnerability occurring in the block subsystem of the Linux kernel.

5

Can CVE-2022-49902 impact system performance?

Yes, CVE-2022-49902 may lead to performance degradation over time due to unfreed memory allocations.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203