]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: prevent crash on qc_kill_conn()
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 4 Jun 2024 09:56:09 +0000 (11:56 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 4 Jun 2024 12:59:24 +0000 (14:59 +0200)
commitf7ae84e7d1b20201b38348d9dcbaefa47eb29814
treec5f5f7cafc68d91bbb0601fa7ec4bc55f4ca49fa
parent792a645ec21126c74c33820d1e0de63ee98aa810
BUG/MINOR: quic: prevent crash on qc_kill_conn()

Ensure idle_timer task is allocated in qc_kill_conn() before waking it
up. It can be NULL if idle timer has already fired but MUX layer is
still present, which prevents immediate quic_conn release.

qc_kill_conn() is only used on send() syscall fatal error to notify
upper layer of an error and close the whole connection asap.

This crash occurence is pretty rare as it relies on timing issues. It
happens only if idle timer occurs before the MUX release (a bigger
client timeout is thus required) and any send() syscall detected error.
For now, it was only reproduced using GDB to interrupt haproxy longer
than the idle timeout.

This should be backported up to 2.6.
src/quic_conn.c