BUG/MEDIUM: quic: QUIC CID removed from tree without locking
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 13 Dec 2023 10:45:43 +0000 (11:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 14 Dec 2023 08:58:22 +0000 (09:58 +0100)
commit85282ca56491e7514a7a04c019f1f795b0a86af6
tree418bf478693430c7606b5ba66227f0256b6d1972
parentc1f77fa3edef28aa9baf2c8e496e2279a8c23004
BUG/MEDIUM: quic: QUIC CID removed from tree without locking

This bug arrived with this commit:

   BUG/MINOR: quic: Wrong RETIRE_CONNECTION_ID sequence number chec

Every connection ID manipulations against the by thread trees used to store the
connection IDs must be done under the trees locks. These trees are accessed by
the low level connection identification code.

When receiving a RETIRE_CONNECTION_ID frame, the concerned connection ID must
be deleted from the its underlying by thread tree but not without locking!
Add a WR lock around ebmb_delete() call to do so.

Must be backported as far as 2.7.

(cherry picked from commit dd58dff1e64fa382d368958469506c296454fde6)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/quic_rx.c