header when destination connection id is not present. To save CPU cycles.
Issue has been noticed and kindly reported by Dan Carpenter via
openssl-users@ mailing list.
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Thu Apr 16 22:59:33 2026
(Merged from https://github.com/openssl/openssl/pull/30795)
if (!port->allow_incoming)
goto undesirable;
+ /*
+ * packet without destination connection id is invalid/corrupted here.
+ * stop wasting CPU cycles now.
+ */
+ if (dcid == NULL)
+ goto undesirable;
+
/*
* We have got a packet for an unknown DCID. This might be an attempt to
* open a new connection.