]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
ssl/quic/quic_ackm.c: fix unhandled memory failure in tx pkt history map insert
authorJakub Zelenka <jakub.zelenka@openssl.foundation>
Wed, 20 May 2026 17:11:40 +0000 (19:11 +0200)
committerEugene Syromiatnikov <esyr@openssl.org>
Tue, 26 May 2026 09:58:41 +0000 (11:58 +0200)
This can cause error when freeing txpim as it can be still in use so the
assert in it fails.

Fixes: fa4e92a70a5f "QUIC ACK Manager, Statistics Manager and Congestion Control API"
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Tue May 26 09:59:05 2026
(Merged from https://github.com/openssl/openssl/pull/31258)

ssl/quic/quic_ackm.c

index 503a6eae19ec9f4c50f392f736f21af33c28478d..3d419c478ba3b8926b65f68904696b71250b6e69 100644 (file)
@@ -117,6 +117,8 @@ tx_pkt_history_add_actual(struct tx_pkt_history_st *h,
         return 0;
 
     lh_OSSL_ACKM_TX_PKT_insert(h->map, pkt);
+    if (lh_OSSL_ACKM_TX_PKT_error(h->map))
+        return 0;
 
     ossl_list_tx_history_insert_tail(&h->packets, pkt);
     return 1;