Wireshark-commits: [Wireshark-commits] master 44ed20a: QUIC: fix unintended address/port match for

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 14 Jul 2020 08:13:50 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=44ed20a97cea0e387eb56752ab61bd9a707efeb6
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

44ed20a by Peter Wu (peter@xxxxxxxxxxxxx):

    QUIC: fix unintended address/port match for empty DCID
    
    Commit "QUIC: fix decryption when the client uses an empty SCID"
    addressed the root cause that prevented connections from being correctly
    linked. However another trace with an empty DCID was still properly
    linked even in presence of the bug.
    
    It turns out that an earlier optimization has an unintended change.
    If a short packet was preceded by any packet with a DCID of exactly 20
    bytes, then a connection with an empty CID is looked up as expected, by
    `quic_connection_find_dcid(pinfo, NULL, from_server)`. However if no
    earlier DCID of exactly 20 bytes exists, then a lookup by address/port
    would occur. That is why earlier traces still decrypt successfully.
    
    Restore the intended behavior to ensure that (1) invalid DCIDs in a Long
    Header packet are ignored, and (2) Short Header Packets are not
    accidentally matched to a wrong session based on an address/port match.
    The latter could occur if the same src/dst address/port tuple is reused
    across different QUIC connections when all CIDs are not 20 bytes.
    
    Change-Id: Ida2523a0922314c7a455dec7e1f8f0442be27e94
    Ping-Bug: 13881
    Fixes: v2.9.0rc0-1878-gfc9e404ab2 ("QUIC: small connection tracking optimization")
    Reviewed-on: https://code.wireshark.org/review/37845
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  608835b   Don't call any routines from WinPcap/Npcap packet32.dll.
     add  44ed20a   QUIC: fix unintended address/port match for empty DCID


Summary of changes:
 epan/dissectors/packet-quic.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)