A QUIC backend connection is instantiated in qc_conn_init() via
xprt_quic. First, a random CID is generated and inserted into the tree.
On success, the quic-conn instance is allocated.
If the allocation fails, the CID is freed but not removed from the
global CID tree. This may cause a UAF issue later. Fix this by removing
the CID from the tree prior to freeing it.
This must be backported up to 3.3.
qc = qc_new_conn(srv, NULL, NULL, conn, conn_id, NULL, &srv->addr);
if (!qc) {
+ quic_cid_delete(conn_id);
pool_free(pool_head_quic_connection_id, conn_id);
goto out;
}