Linux
net/sched: taprio: fix use-after-free in advance_sched() on schedule switch
In the Linux kernel, the following vulnerability has been resolved: net/sched: taprio: fix use-after-free in advance_sched() on schedule switch In advance_sched(), when should_change_schedules() returns true, switch_schedules() is called to promote the admin schedule to oper. switch_schedules() queues the old oper schedule for RCU freeing via call_rcu(), but 'next' still points into an entry of the old oper schedule. The subsequent 'next->end_time = end_time' and rcu_assign_pointer(q->current_entry, next) are use-after-free. Fix this by selecting 'next' from the new oper schedule immediately after switch_schedules(), and using its pre-calculated end_time. setup_first_end_time() sets the first entry's end_time to base_time + interval when the schedule is installed, so the value is already correct. The deleted 'end_time = sched_base_time(admin)' assignment was also harmful independently: it would overwrite the new first entry's pre-calculated end_time with just base_time.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= a3d43c0d56f1b94e74963a2fbadfb70126d92213, < a8fc396519ef4f081bc545e88f61241728bb78d7
- >= a3d43c0d56f1b94e74963a2fbadfb70126d92213, < 3471874578160a28c171a607fa069f24062634b8
- >= a3d43c0d56f1b94e74963a2fbadfb70126d92213, < 7256996e1ef553716817f3bfd077c2f3b48b582f
- >= a3d43c0d56f1b94e74963a2fbadfb70126d92213, < eee072fe16c646190d33ae69c9983d8de1562bf8
- >= a3d43c0d56f1b94e74963a2fbadfb70126d92213, < 1bd286fa3e21200133478ed523cc6a2788baf38a
- >= a3d43c0d56f1b94e74963a2fbadfb70126d92213, < b73235da5dde77ed1264f9767b62c28c9d71fd78
- >= a3d43c0d56f1b94e74963a2fbadfb70126d92213, < 0e62171df8ed4804d00db088f17eed06468233fa
- >= a3d43c0d56f1b94e74963a2fbadfb70126d92213, < 105425b1969c5affe532713cfac1c0b320d7ac2b
Fixed in a8fc396519ef4f081bc545e88f61241728bb78d7, 3471874578160a28c171a607fa069f24062634b8, 7256996e1ef553716817f3bfd077c2f3b48b582f, eee072fe16c646190d33ae69c9983d8de1562bf8, 1bd286fa3e21200133478ed523cc6a2788baf38a, b73235da5dde77ed1264f9767b62c28c9d71fd78, 0e62171df8ed4804d00db088f17eed06468233fa, 105425b1969c5affe532713cfac1c0b320d7ac2b
- 5.2
Fixed in 0, 5.10.258, 5.15.209, 6.1.175, 6.6.141, 6.12.91, 6.18.33, 7.0.10, 7.1
Mitigation
Upgrade Linux to a8fc396519ef4f081bc545e88f61241728bb78d7 or 3471874578160a28c171a607fa069f24062634b8 or 7256996e1ef553716817f3bfd077c2f3b48b582f or eee072fe16c646190d33ae69c9983d8de1562bf8 or 1bd286fa3e21200133478ed523cc6a2788baf38a or b73235da5dde77ed1264f9767b62c28c9d71fd78 or 0e62171df8ed4804d00db088f17eed06468233fa or 105425b1969c5affe532713cfac1c0b320d7ac2b or later.
Upgrade Linux to 0 or 5.10.258 or 5.15.209 or 6.1.175 or 6.6.141 or 6.12.91 or 6.18.33 or 7.0.10 or 7.1 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.