block: fix resource leak in blk_register_queue() error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
block: fix resource leak in blk_register_queue() error path
When registering a queue fails after blk_mq_sysfs_register() is successful but the function later encounters an error, we need to clean up the blk_mq_sysfs resources.
Add the missing blk_mq_sysfs_unregister() call in the error path to properly clean up these resources and prevent a memory leak.
From the CVE record · Linux
The Linux kernel can leak resources when block queue registration fails after blk_mq_sysfs_register() succeeds. The input does not describe an attacker action, access requirements, or user interaction; the leak occurs on this error path.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions are not specified.