blk-cgroup: fix UAF in __blkcg_rstat_flush()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
0f6090d90f627d8c58f939067d6c6821ce1b3c68| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
blk-cgroup: fix UAF in __blkcg_rstat_flush()
When multiple blkgs in the same blkcg are released concurrently, a use-after-free can occur. The race happens when one blkg's __blkcg_rstat_flush() removes another blkg's iostat entries via llist_del_all(). The second blkg sees an empty list and proceeds to free itself while the first is still iterating over its entries.
Move the flush from __blkg_release() (RCU callback) to blkg_release() (before call_rcu). This ensures the RCU grace period waits for any concurrent flush's rcu_read_lock() section to complete before freeing.
From the CVE record · Linux
The Linux kernel’s blk-cgroup code has a use-after-free race when multiple blkgs in the same blkcg are released concurrently. The input does not specify an attacker path, authentication requirements, user interaction, or a resulting impact beyond the use-after-free.
Engineers running the Linux kernel should check whether their version is affected; affected versions are not specified.