CVE-2022-50550
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-10-07

Last updated on: 2026-02-26

Assigner: kernel.org

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-10-07
Last Modified
2026-02-26
Generated
2026-05-07
AI Q&A
2025-10-07
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-401 The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a memory leak in the Linux kernel's blk-iolatency component. It occurs when a gendisk is initialized successfully but the add_disk() function fails, such as when a loop device has an invalid number of minor device numbers. In this case, blkcg_init_disk() initializes iolatency, but during error handling, blkcg_exit_disk() does not clean it up properly, causing a memory leak. The issue arises because iolatency is initialized before add_disk() is called, unlike other rq_qos policies that are cleaned up later. The fix involves adding an extra call to rq_qos_exit() during error handling to ensure proper cleanup.


How can this vulnerability impact me? :

This vulnerability can lead to a memory leak in the Linux kernel when certain disk initialization failures occur. Over time, this memory leak could degrade system performance or stability, potentially causing resource exhaustion or crashes if the leak is significant and persistent.


What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation involves applying the fix that adds an extra call to rq_qos_exit() in blkcg_exit_disk() to ensure proper cleanup of iolatency on add_disk() failures. This fix prevents the memory leak by safely handling duplicate calls to rq_qos_exit(). Therefore, updating the Linux kernel to a version that includes this patch is the recommended immediate step.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart