From: Matt Caswell Date: Wed, 9 Apr 2025 12:06:24 +0000 (+0100) Subject: Prevent SSL_poll from reporting a stream as writeable if it isn't X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4efd1a26822a05e900a9dcffc0d6554efece7923;p=thirdparty%2Fopenssl.git Prevent SSL_poll from reporting a stream as writeable if it isn't The CWM might prevent a stream from being writeable. We should not report a stream as writeable if there is no credit. Fixes #27312 Reviewed-by: Neil Horman Reviewed-by: Saša Nedvědický Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/27319) --- diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 6e3de7d5050..847639b89e5 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -5106,6 +5106,8 @@ static int test_poll_event_w(QUIC_XSO *xso) && ossl_quic_stream_has_send_buffer(xso->stream) && ossl_quic_sstream_get_buffer_avail(xso->stream->sstream) && !ossl_quic_sstream_get_final_size(xso->stream->sstream, NULL) + && ossl_quic_txfc_get_cwm(&xso->stream->txfc) + > ossl_quic_sstream_get_cur_size(xso->stream->sstream) && quic_mutation_allowed(xso->conn, /*req_active=*/1); }