]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: quic: Big RX dgrams leak when fulfilling a buffer
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 23 Jun 2022 16:00:37 +0000 (18:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jun 2022 18:40:01 +0000 (20:40 +0200)
commit19ef6369b5539daa9da63195df630b08e4b0cccd
tree6ca11bd4bdbf5e595202bcb1df6e228b77c89229
parent0c535683eef05b420d7bf0b25cf38820d02333fe
BUG/MAJOR: quic: Big RX dgrams leak when fulfilling a buffer

When entering quic_sock_fd_iocb() I/O handler which is responsible
of recvfrom() datagrams, the first thing which is done it to try
to reuse a dgram object containing metadata about the received
datagrams which has been consumed by the connection thread.
If this object could not be used for any reason, so when we
"goto out" of this function, we must release the memory allocated
for this objet, if not it will leak. Most of the time, this happened
when we fulfilled a buffer as reported in GH #1749 by Tristan. This is why we
added a pool_free() call just before the out label. We mark <new_dgram> as NULL
when it successfully could be used.

Thank you for Tristan and Willy for their participation on this issue.

Must be backported to 2.6.
src/quic_sock.c