net/sched: fix use-after-free in __tcf_action_put()
Impact
In the Linux kernel, the following vulnerability has been resolved:
Source excerpt · LinuxAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
Linux · Linux
Other versions: unaffected
| Version / range | Source status |
|---|---|
| 16af6067392c40e454e49eec834843ab03643d96 to before 2465d27ef90de9105c2bffb6c35f8ce08918e642 | affected |
| 16af6067392c40e454e49eec834843ab03643d96 to before 2e012e431aa271ef3c84206f48854f539c03bff0 | affected |
| 16af6067392c40e454e49eec834843ab03643d96 to before 7b16eb911091aae237a8673da94e4dfb9cd21d54 | affected |
Linux · Linux
Other versions: affected
| Version / range | Source status |
|---|---|
| 4.19 | affected |
| 0 to before 4.19 | unaffected |
| 6.18.59 through 6.18.* (inclusive) | unaffected |
| 7.2.13 through 7.2.* (inclusive) | unaffected |
| 7.3 through * (inclusive) | unaffected |
Original source description
In the Linux kernel, the following vulnerability has been resolved:
net/sched: fix use-after-free in __tcf_action_put()
__tcf_action_put() decrements the reference count before decrementing the binding count. Another thread can free the action between these operations, causing the binding-count update to access freed memory. KASAN reports it as:
BUG: KASAN: slab-use-after-free in __tcf_action_put+0x327/0x340 Write of size 4 at addr ff11000000d46420 by task tc-put-pause/64
Hold the action IDR mutex across both counter updates and IDR removal, keeping cleanup outside the lock.