В ядре Linux устранена следующая уязвимость: net: bridge: use option bits for CFM/MRP frame handlers CFM и MRP регистрируют глобальный br_frame_type, чей hlist_node связан с per-bridge frame_type_list при создании первого экземпляра MEP/MRP. Включение протокола на нескольких мостах, таким образом, вставляет один и тот же узел в несколько списков. Unregistering он на одном мосту затем повреждает состояние списка, принадлежащее другому.
Эти обработчики могут быть установлены только один раз на мост, и они необычны. Отслеживайте состояние каждого моста с помощью битов опции net_bridge, которые уже находятся на линии горячего кэша Rx, и отправляйте соответствующий обработчик непосредственно с пути приема. Сначала проверьте оба бита вместе как маловероятный случай.
Удалите общие помощники frame_type_list и br_frame_type, у которых не было других пользователей после добавления CFM и MRP. Это сокращает структуру net_bridge на 8 байт и сбрасывает список с быстрого пути. Когда ни один из протоколов не скомпилирован, BR_CFM_MRP_OPTS равен 0, и компилятор обрезает ветку.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: bridge: use option bits for CFM/MRP frame handlers CFM and MRP register a global br_frame_type whose hlist_node is linked into the per-bridge frame_type_list when the first MEP/MRP instance is created. Enabling the protocol on multiple bridges therefore inserts the same node into multiple lists. Unregistering it on one bridge then corrupts list state belonging to another. These handlers can only be installed once per bridge, and they are uncommon. Track their per-bridge enable state with net_bridge option bits, which already live on the Rx hot cache line, and dispatch the matching handler directly from the receive path. Check both bits together first as an unlikely case. Remove the generic frame_type_list and br_frame_type helpers, which have had no other users since CFM and MRP were added. That shrinks struct net_bridge by 8 bytes and drops the list walk from the fast path. When neither protocol is compiled in, BR_CFM_MRP_OPTS is 0 and the compiler prunes the branch.