# CVE-2022-49902: block: Fix possible memory leak for rq\_wb on add\_disk failure

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-05-01T14:10:47.608Z
- **Modified:** 2026-06-17T05:19:28.137Z

## Who should check

- Anyone running Linux \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< 4e68c5da60cd79950bd56287ae80b39d6261f995; \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< 528677d3b4af985445bd4ac667485ded1ed11220; \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< fa81cbafbf5764ad5053512152345fab37a1fe18
- Anyone running Linux 5.15

## Description

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

block: Fix possible memory leak for rq\_wb on add\_disk failure

kmemleak reported memory leaks in device\_add\_disk():

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\>\] kmalloc\_trace+0x26/0x60
    \[\<00000000edc7aadc\>\] wbt\_init+0x50/0x6f0
    \[\<0000000069601d16\>\] wbt\_enable\_default+0x157/0x1c0
    \[\<0000000028fc393f\>\] blk\_register\_queue+0x2a4/0x420
    \[\<000000007345a042\>\] device\_add\_disk+0x6fd/0xe40
    \[\<0000000060e6aab0\>\] nbd\_dev\_add+0x828/0xbf0 \[nbd\]
    ...

It is because the memory allocated in wbt\_enable\_default() is not
released in device\_add\_disk() error path.
Normally, these memory are freed in:

del\_gendisk()
  rq\_qos\_exit()
    rqos-\>ops-\>exit(rqos);
      wbt\_exit()

So rq\_qos\_exit() is called to free the rq\_wb memory for wbt\_init().
However in the error path of device\_add\_disk(), only
blk\_unregister\_queue() is called and make rq\_wb memory leaked.

Add rq\_qos\_exit() to the error path to fix it.

## Affected and fixed versions

- Linux: \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< 4e68c5da60cd79950bd56287ae80b39d6261f995; \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< 528677d3b4af985445bd4ac667485ded1ed11220; \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< fa81cbafbf5764ad5053512152345fab37a1fe18 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49902. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49902.md
Affected: Linux >= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, < 4e68c5da60cd79950bd56287ae80b39d6261f995; >= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, < 528677d3b4af985445bd4ac667485ded1ed11220; >= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, < fa81cbafbf5764ad5053512152345fab37a1fe18; Linux 5.15
Fixed in: Linux 4e68c5da60cd79950bd56287ae80b39d6261f995, Linux 528677d3b4af985445bd4ac667485ded1ed11220

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49902 being exploited?

There is no confirmed exploitation: CVE-2022-49902 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49902?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49902?

Linux \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< 4e68c5da60cd79950bd56287ae80b39d6261f995; \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< 528677d3b4af985445bd4ac667485ded1ed11220; \>= 83cbce9574462c6b4eed6797bdaf18fae6859ab3, \< fa81cbafbf5764ad5053512152345fab37a1fe18; Linux 5.15.

### Is there a fix for CVE-2022-49902?

Yes. Fixed in Linux 4e68c5da60cd79950bd56287ae80b39d6261f995, Linux 528677d3b4af985445bd4ac667485ded1ed11220. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-49902?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/4e68c5da60cd79950bd56287ae80b39d6261f995>
- patch: <https://git.kernel.org/stable/c/528677d3b4af985445bd4ac667485ded1ed11220>
- patch: <https://git.kernel.org/stable/c/fa81cbafbf5764ad5053512152345fab37a1fe18>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49902>

HTML: <https://flawdb.com/CVE-2022-49902> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49902>
