В ядре Linux устранена следующая уязвимость:
netfilter: nf_conntrack_reasm: настройка защиты mac_header после дефрагментации IPv6
nf_ct_frag6_reasm() перемещает заголовок пакета вперед, чтобы отбросить IPv6.
заголовок фрагмента, а затем безоговорочно продвигает skb->mac_header:
skb->mac_header += sizeof(struct frag_hdr);
На пути дефрагментации NF_INET_LOCAL_OUT skb не имеет заголовка канального уровня.
тем не менее, поэтому skb->mac_header по-прежнему является «не установленным» дозорным (u16)~0U. Добавление
sizeof(struct frag_hdr) преобразует его в небольшое значение (0xffff + 8 == 7),
после чего skb_mac_header_was_set() ошибочно сообщает, что заголовок MAC
присутствует, а skb_mac_header() указывает на запас. Пересборщик выполнил это безусловное добавление с момента его появления;
это было безвредно, пока mac_header был голым указателем, но однажды это было неправильно
mac_header стал смещением u16, неустановленным состоянием которого является сигнальный индикатор ~0U.
проверено skb_mac_header_was_set().
Родственный net/ipv6/reassembly.c делает то же самое перемещение и охраняет корректировку; отразить охранник здесь.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack_reasm: guard mac_header adjustment after IPv6 defrag nf_ct_frag6_reasm() slides the packet head forward to drop the IPv6 fragment header and then unconditionally advances skb->mac_header: skb->mac_header += sizeof(struct frag_hdr); On the NF_INET_LOCAL_OUT defrag path the skb has no link-layer header yet, so skb->mac_header is still the "not set" sentinel (u16)~0U. Adding sizeof(struct frag_hdr) wraps it to a small value (0xffff + 8 == 7), after which skb_mac_header_was_set() wrongly reports a MAC header is present and skb_mac_header() points into the headroom. The reassembler has done this unconditional add since it was introduced; it was harmless while mac_header was a bare pointer, but wrong once mac_header became a u16 offset whose unset state is the ~0U sentinel tested by skb_mac_header_was_set(). The sibling net/ipv6/reassembly.c does the same relocation and does guard the adjustment; mirror the guard here.
Характеристики атаки
Последствия
Строка CVSS v3.1