blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()
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:
blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()
Add the missing put_disk() on the error path in blkcg_maybe_throttle_current(). When blkcg lookup, blkg lookup, or blkg_tryget() fails, the function jumps to the out label which only calls rcu_read_unlock() but does not release the disk reference acquired by blkcg_schedule_throttle() via get_device(). Since current->throttle_disk is already set to NULL before the lookup, blkcg_exit() cannot release this reference either, causing the disk to never be freed.
Restore the reference release that was present as blk_put_queue() in the original code but was inadvertently dropped during the conversion from request_queue to gendisk.
From the CVE record · Linux
The Linux kernel can leak a disk reference when a lookup or blkg_tryget() fails in blkcg_maybe_throttle_current(), preventing the disk from being freed. The input does not specify how an attacker could trigger this condition or whether access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their systems; affected versions are not specified.