]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-quic: free task on qc_init() app ops failure
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 12 May 2023 14:29:48 +0000 (16:29 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 12 May 2023 14:37:27 +0000 (16:37 +0200)
commitee65efbfaea35df4038ec9a9a0fb8c63ad0eb0cc
treec736be064afe0180ae668af2b8c060d91e98e813
parent6c501ed23bea953518059117e7dd19e8d6cb6bd8
BUG/MINOR: mux-quic: free task on qc_init() app ops failure

qc_init() is used to initialize a QUIC MUX instance. On failure, each
resources are released via a series of goto statements. There is one
issue if the app_ops.init callback fails. In this case, MUX task is not
freed.

This can cause a crash as the task is already scheduled. When the
handler will run, it will crash when trying to access qcc instance.

To fix this, properly destroy qcc task on fail_install_app_ops label.

The impact of this bug is minor as app_ops.init callback succeeds most
of the time. However, it may fail on allocation failure due to memory
exhaustion.

This may fix github issue #2154.

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