blk-cgroup: fix leaks and online flag on radix_tree_insert failure
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel f53945d7c712efe63fadbcc5ffed6370871fd0d3, Kernel 0f840db042caee9d2f3dcdcf97d6674f6e4c1e30, Kernel 4c0d150fb98ea40760611979f4e664c244b20966 and 10 more.
In the Linux kernel, the following vulnerability has been resolved: blk-cgroup: fix leaks and online flag on radix_tree_insert failure When radix_tree_insert() fails in blkg_create(), the error path has two issues: 1. blkg->online is set to true unconditionally, even when the blkg was never fully inserted. Move the assignment inside the success block. 2. The error path calls blkg_put() without first calling percpu_ref_kill(). Because the refcount is still in percpu mode, percpu_ref_put() only does this_cpu_sub() without checking for zero, so blkg_release() is never triggered. This permanently leaks the blkg memory, its percpu iostat, policy data, the parent blkg reference, and the cgroup css reference — the latter preventing the cgroup from ever being destroyed. Fix by replacing blkg_put() with percpu_ref_kill(), matching the pattern used in blkg_destroy().
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=7fcf2b033b84e261dca283bc2911aaea4b07b525 <f53945d7c712efe63fadbcc5ffed6370871fd0d3, >=7fcf2b033b84e261dca283bc2911aaea4b07b525 <0f840db042caee9d2f3dcdcf97d6674f6e4c1e30, >=7fcf2b033b84e261dca283bc2911aaea4b07b525 <4c0d150fb98ea40760611979f4e664c244b20966, >=7fcf2b033b84e261dca283bc2911aaea4b07b525 <6e85f02d45b5977c0326a8d854c6db878aa6b34a, >=7fcf2b033b84e261dca283bc2911aaea4b07b525 <ada8270ccdb6f212da5eb22614c28ea418746a4a, >=7fcf2b033b84e261dca283bc2911aaea4b07b525 <c3650be82ef6e7af13b79b2d10a7363bdf54aa7f, >=7fcf2b033b84e261dca283bc2911aaea4b07b525 <dbbca20764382b4d411ec2918f4e278ffe547acc, =5.0 | f53945d7c712efe63fadbcc5ffed6370871fd0d3, 0f840db042caee9d2f3dcdcf97d6674f6e4c1e30, 4c0d150fb98ea40760611979f4e664c244b20966, 6e85f02d45b5977c0326a8d854c6db878aa6b34a, ada8270ccdb6f212da5eb22614c28ea418746a4a, c3650be82ef6e7af13b79b2d10a7363bdf54aa7f, dbbca20764382b4d411ec2918f4e278ffe547acc |
| linux-kernel: Kernel | >=5.11.0 <5.15.222, >=5.16.0 <6.1.189, >=6.13.0 <6.18.53, >=6.2.0 <6.6.158, >=6.7.0 <6.12.111, >=5.0.0 <5.10.271 | 5.15.222, 6.1.189, 6.18.53, 6.6.158, 6.12.111, 5.10.271 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket