В ядре Linux устранена следующая уязвимость:
sctp: синхронизировать chunk->transport со списком, в котором он находится в очереди
__sctp_outq_flush_rtx() перемещает фрагмент с пробелами на другой транспортный
переданный список без обновления chunk->transport:
если (chunk->tsn_gap_acked) {
list_move_tail(&chunk->transmitted_list,
&транспорт->передано);
продолжать;
}
Затем чанк помещается в список действующего транспорта, в то время как chunk->transport все еще остается.
называет другое. Если этот транспорт удален — sctp_assoc_rm_peer()
из ASCONF Delete-IP - sctp_transport_free() RCU освобождает его и чанк
остается с висячим указателем. sctp_assoc_rm_peer() очищает
одноранговый узел->передается и asoc->outqueue.out_chunk_list, но чанк включен
ни то, ни другое. Указатель не следует, пока установлен tsn_gap_acked.
МЕШОК, который
отказывается от TSN, сбрасывает флаг, и следующий SACK достигает
tchunk->transport->flight_size -= sctp_data_size(tchunk);
внутри освобожденного транспорта. KASAN сообщает об использовании плиты после освобождения
sctp_check_transmitted(), освобожденный от sctp_assoc_rm_peer(). Оба
удаление, и пакеты SACK поступают от узла ассоциации. Установите chunk->transport на ходу.
Обычный путь повторной отправки ничего не требует:
он достигает своего list_move_tail() только после sctp_packet_append_chunk()
вернул SCTP_XMIT_OK, а __sctp_packet_append_chunk() восстановил
кусок к тому времени. Обнаружено XBOW, проверено Баулом Ли <baul.lee@xbow.com>
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: sctp: keep chunk->transport in step with the list it is queued on __sctp_outq_flush_rtx() moves a gap-acked chunk onto another transport's transmitted list without updating chunk->transport: if (chunk->tsn_gap_acked) { list_move_tail(&chunk->transmitted_list, &transport->transmitted); continue; } The chunk then sits on a live transport's list while chunk->transport still names a different one. If that transport is removed - sctp_assoc_rm_peer() from an ASCONF Delete-IP - sctp_transport_free() RCU-frees it and the chunk is left with a dangling pointer. sctp_assoc_rm_peer() scrubs peer->transmitted and asoc->outqueue.out_chunk_list, but the chunk is on neither. The pointer is not followed while tsn_gap_acked is set. A SACK that reneges on the TSN clears the flag, and the next SACK reaches tchunk->transport->flight_size -= sctp_data_size(tchunk); inside the freed transport. KASAN reports a slab-use-after-free read in sctp_check_transmitted(), freed from sctp_assoc_rm_peer(). Both the removal and the SACKs come from the association peer. Set chunk->transport at the move. The ordinary resend path needs nothing: it reaches its list_move_tail() only after sctp_packet_append_chunk() returned SCTP_XMIT_OK, and __sctp_packet_append_chunk() has rebound the chunk by then. Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>
Характеристики атаки
Последствия
Строка CVSS v3.1