В ядре Linux устранена следующая уязвимость:
net/sched: cls_u32: пропустить хэш-таблицы в u32_bind_class()
u32_walk() перечисляет как struct tc_u_hnode, так и struct tc_u_knode
через обратный вызов Walker. u32_bind_class() безоговорочно приводит
передал fh в tc_u_knode и получил доступ к &n->res, поэтому, когда fh на самом деле является
tc_u_hnode, у которого нет члена tcf_result, это приводит к
slab-out-of-bound чтение res->classid в tc_cls_bind_class().
Проблему можно воспроизвести с помощью следующих команд:
tc qdisc добавить корневой дескриптор 1 dev lo: hfsc
класс tc добавить dev lo родительский 1: classid 1:1 скорость hfsc sc 1000 кбит
tc фильтр добавить dev lo родительский протокол 1:1 протокол ip prio 1 u32 match u32 0 0 flowid 1:1
класс tc добавить dev lo родительский элемент 1: classid 1:2 hfsc sc скорость 2000 кбит
Исправьте это, пропустив хэш-таблицы с помощью проверки TC_U32_KEY(handle).
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net/sched: cls_u32: skip hash tables in u32_bind_class() u32_walk() enumerates both struct tc_u_hnode and struct tc_u_knode through the walker callback. u32_bind_class() unconditionally casts the passed fh to tc_u_knode and accesses &n->res, so when fh is actually a tc_u_hnode, which has no tcf_result member, this results in a slab-out-of-bounds read of res->classid in tc_cls_bind_class(). The issue can be reproduced with the following commands: tc qdisc add dev lo root handle 1: hfsc tc class add dev lo parent 1: classid 1:1 hfsc sc rate 1000kbit tc filter add dev lo parent 1:1 protocol ip prio 1 u32 match u32 0 0 flowid 1:1 tc class add dev lo parent 1: classid 1:2 hfsc sc rate 2000kbit Fix this by skipping hash tables via the TC_U32_KEY(handle) check.
Характеристики атаки
Последствия
Строка CVSS v3.1