В ядре Linux была устранена следующая уязвимость: inetpeer: рандомизация сравнения узлов RB-дерева с использованием SipHash The inetpeer rate limiting system хранит одноранговые записи в ключе дерева Red-Black детерминированно на удаленном адресе IP. Поскольку поиск по дереву идет по RB-дереву, используя стандартные лексикографические сравнения (inetpeer_addr_cmp), противник может предсказать точную топологию дерева и последовательность узлов, пройденных во время поиска (список кандидатов gc_stack). Комбинируя детерминированный обход дерева с агрессивным сбором мусора (запускается, когда размер дерева превышает inet_peer_threshold), злоумышленник может выборочно заставить удалить целевые узлы inet_peer.
Когда выброшенный узел впоследствии повторно создается после получения нового пакета, его ведро токенов с ограничением скорости (rate_tokens, rate_last) сбрасывается на полную мощность. Это создает примитив бокового канала, позволяющий злоумышленникам обойти ограничения скорости ICMP с IP-ключом и вывести открытые порты UDP (аналогично атакам в стиле SAD DNS). Смягчите это, рандомизировав логику сравнения узлов RB-дерева с помощью SipHash с помощью секретного ключа (inetpeer_hash_key), инициализированного через net_get_random_once().
Узлы упорядочены в дереве по SipHash(addr, key), а не по необработанным адресам IP. Поскольку секретный ключ неизвестен внешним сущностям, макет дерева и траверсные пути поиска непредсказуемы для противников, взламывая детерминированный гаджет выселения. Кэшируйте 64-битный SipHash (хэш) в struct inet_peer и вычисляйте целевой хэш (dhash) один раз в начале inet_getpeer (), чтобы избежать перевычисления SipHash на каждом шагу прогулки по RB-дереву.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: inetpeer: randomize RB-tree node comparison using SipHash The inetpeer rate limiting system stores peer entries in a Red-Black tree keyed deterministically on the remote IP address. Because tree lookups walk the RB-tree using standard lexicographical comparisons (inetpeer_addr_cmp), an off-path adversary can predict the exact topology of the tree and the sequence of nodes traversed during lookups (the gc_stack candidate list). By combining deterministic tree traversal with aggressive garbage collection (triggered when tree size exceeds inet_peer_threshold), an attacker can selectively force the eviction of targeted inet_peer nodes. When an evicted node is subsequently re-created upon receiving a new packet, its rate-limiting token bucket (rate_tokens, rate_last) is reset to full capacity. This creates a side-channel primitive allowing off-path attackers to bypass IP-keyed ICMP rate limits and infer open UDP ports (similar to SAD DNS style attacks). Mitigate this by randomizing the RB-tree node comparison logic using SipHash with a secret key (inetpeer_hash_key) initialized via net_get_random_once(). Nodes are ordered in the tree by SipHash(addr, key) rather than raw IP addresses. Because the secret key is unknown to external entities, the tree layout and lookup traversal paths are unpredictable to off-path adversaries, breaking the deterministic eviction gadget. Cache the computed 64-bit SipHash (hash) in struct inet_peer and compute the target hash (dhash) once at the beginning of inet_getpeer() to avoid recomputing SipHash at every step of the RB-tree walk.
Характеристики атаки
Последствия
Строка CVSS v3.1