]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: quic: prevent crash on Retry sending
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 19 Apr 2023 08:04:41 +0000 (10:04 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 19 Apr 2023 08:18:58 +0000 (10:18 +0200)
commit89e48ff92f3ac7645a4d90fc352b88aba8af802a
tree576cb5c29794fa81b49535d3302d361e6ad59053
parent5003ac7fe9b3709daa624d087bb1cc2ee93a8a3a
BUG/MEDIUM: quic: prevent crash on Retry sending

The following commit introduced a regression :
  commit 1a5cc19cecfa84bfd0fdd7b9d5d20899cce40662
  MINOR: quic: adjust Rx packet type parsing

Since this commit, qv variable was left to NULL as version is stored
directly in quic_rx_packet instance. In most cases, this only causes
traces to skip version printing. However, qv is dereferenced when
sending a Retry which causes a segfault.

To fix this, simply remove qv variable and use pkt->version instead,
both for traces and send_retry() invocation.

This bug was detected thanks to QUIC interop runner. It can easily be
reproduced by using quic-force-retry on the bind line.

This must be backported up to 2.7.
src/quic_conn.c