]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Prevent SSL_poll from reporting a stream as writeable if it isn't
authorMatt Caswell <matt@openssl.org>
Wed, 9 Apr 2025 12:06:24 +0000 (13:06 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 11 Apr 2025 06:59:55 +0000 (07:59 +0100)
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 <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27319)

(cherry picked from commit 4efd1a26822a05e900a9dcffc0d6554efece7923)

ssl/quic/quic_impl.c

index 6e3de7d50501b1f56ad9109ce1c5bfbad4dd1e82..847639b89e51b705bb0c18ecb036c8ad6988a6c2 100644 (file)
@@ -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);
 }