CVE-2022-50550 Details
Description
In the Linux kernel, the following vulnerability has been resolved: blk-iolatency: Fix memory leak on add_disk() failures When a gendisk is successfully initialized but add_disk() fails such as when a loop device has invalid number of minor device numbers specified, blkcg_init_disk() is called during init and then blkcg_exit_disk() during error handling. Unfortunately, iolatency gets initialized in the former but doesn't get cleaned up in the latter. This is because, in non-error cases, the cleanup is performed by del_gendisk() calling rq_qos_exit(), the assumption being that rq_qos policies, iolatency being one of them, can only be activated once the disk is fully registered and visible. That assumption is true for wbt and iocost, but not so for iolatency as it gets initialized before add_disk() is called. It is desirable to lazy-init rq_qos policies because they are optional features and add to hot path overhead once initialized - each IO has to walk all the registered rq_qos policies. So, we want to switch iolatency to lazy init too. However, that's a bigger change. As a fix for the immediate problem, let's just add an extra call to rq_qos_exit() in blkcg_exit_disk(). This is safe because duplicate calls to rq_qos_exit() become noop's.
A memory leak vulnerability has been identified in the Linux kernel's block I/O latency management. This issue arises when a generic disk (gendisk) is initialized successfully, but the subsequent 'add_disk()' call fails—such as when a loop device is assigned an invalid number of minor device numbers. In these cases, the 'blkcg_init_disk()' function is executed during the initialization phase, but the corresponding 'blkcg_exit_disk()' function is not called during error handling. This oversight occurs because, under normal circumstances, the cleanup process is managed by 'del_gendisk()', which invokes 'rq_qos_exit()' to deactivate request queue quality of service (rq_qos) policies. The current implementation assumes that these policies can only be activated once the disk is fully registered and visible. While this assumption holds true for other rq_qos policies, it fails for iolatency, which is initialized before the disk is officially added. As a result, when an error occurs, the iolatency initialization is not properly reversed, leading to a memory leak. The vulnerability affects several versions of the Linux kernel.
The vulnerability has been addressed in the Linux kernel by adding an extra call to 'rq_qos_exit()' in the 'blkcg_exit_disk()' function. Users should upgrade to the latest version of the Linux kernel where this fix has been applied.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Nov 5, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/215f9437dda09531bcb80605298a24219f01cec5 | kernel.org | Patch |
| https://git.kernel.org/stable/c/2a126e1db5553ce4498290df019866952f858954 | kernel.org | Patch |
| https://git.kernel.org/stable/c/813e693023ba10da9e75067780f8378465bf27cc | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-401 | Missing Release of Memory after Effective Lifetime | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 4.19, < 6.0.17 >= 6.1, < 6.1.2 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 5, 2026 | CVE Modified | kernel.org |
| Nov 5, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Feb 26, 2026 | Reanalysis | [email protected] |
| Feb 4, 2026 | Initial Analysis | [email protected] |
| Oct 7, 2025 | New CVE Received | kernel.org |