В ядре Linux устранена следующая уязвимость:
net/tls: сбой tls_sw_splice_read() после неудачной асинхронной расшифровки
Если асинхронное расшифрование завершается неудачей, tls_decrypt_done() записывает ошибку в
ctx->async_wait.err и вызывает tls_err_abort(), который сохраняет его в
sk_err. tls_sw_recvmsg() и tls_sw_read_sock() каждое чтение
async_wait.err, как только они удерживают блокировку чтения и завершают вызов: a
запись, которая не прошла аутентификацию, разрывает соединение.
tls_sw_splice_read() не имеет такой проверки, и sk_err не участвует
за одного. tls_rx_rec_wait() проверяет sk_err только внутри цикла.
пропускает всякий раз, когда запись уже анализируется, и первый читатель, который
Reach sock_error() очищает его, а async_wait.err сохраняется. А
поэтому splice продолжает доставлять записи о соединении, которые
Recvmsg() и read_sock() отказываются читать.
Прочитайте async_wait.err в tls_sw_splice_read(), как и два других читателя.
делать.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net/tls: Fail tls_sw_splice_read() after a failed async decrypt When an async decrypt fails, tls_decrypt_done() records the error in ctx->async_wait.err and calls tls_err_abort(), which stores it in sk_err. tls_sw_recvmsg() and tls_sw_read_sock() each read async_wait.err once they hold the reader lock and fail the call: a record that did not authenticate breaks the connection. tls_sw_splice_read() has no such check, and sk_err does not stand in for one. tls_rx_rec_wait() tests sk_err only inside the loop it skips whenever a record is already parsed, and the first reader to reach sock_error() clears it, while async_wait.err persists. A splice therefore keeps delivering records on a connection that recvmsg() and read_sock() refuse to read. Read async_wait.err in tls_sw_splice_read() as the other two readers do.