Project

General

Profile

Actions

Bug #7556

open

quic: valid traffic blocked in IPS mode

Added by Victor Julien 8 days ago. Updated 1 day ago.

Status:
Resolved
Priority:
High
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Missing handling of a fragmented Client Hello in Quic leads to the parser reaching an error state, which in IPS mode leads to blocking of the flow.

A quick and dirty workaround is to also set `QuicState::hello_ts` and `QuicState::hello_tc` on receiving these frags, but the real solution is to implement reassembly for the frags.


Files

p3p1-0.5-us13.pcap (26.7 KB) p3p1-0.5-us13.pcap Victor Julien, 02/14/2025 05:59 PM
2231000-1739794908-192.168.0.5-38751-142.251.36.46-443.pcap (2.55 KB) 2231000-1739794908-192.168.0.5-38751-142.251.36.46-443.pcap Victor Julien, 02/17/2025 12:26 PM
2231000-1739794855-192.168.0.5-52755-151.101.129.91-443.pcap (7.68 KB) 2231000-1739794855-192.168.0.5-52755-151.101.129.91-443.pcap Victor Julien, 02/17/2025 12:31 PM
2231000-1739796527-17.253.53.65-443-10.84.1.49-60015.pcap (12.2 KB) 2231000-1739796527-17.253.53.65-443-10.84.1.49-60015.pcap Victor Julien, 02/17/2025 01:10 PM
wls3-quic-us29.pcap (10.4 KB) wls3-quic-us29.pcap Victor Julien, 02/18/2025 08:35 AM
wls3-quic2-us13.pcap (9.96 KB) wls3-quic2-us13.pcap Victor Julien, 02/18/2025 08:20 PM
wls3-quic2-us7.pcap (12.7 KB) wls3-quic2-us7.pcap Victor Julien, 02/18/2025 08:20 PM
wls3-quic2-us670-pkn-32.pcap (14.5 KB) wls3-quic2-us670-pkn-32.pcap Victor Julien, 02/18/2025 08:20 PM
wls3-quic2-us19-weird-packet-number.pcap (46.9 KB) wls3-quic2-us19-weird-packet-number.pcap Victor Julien, 02/18/2025 08:20 PM
wls3-quic2-us1479.pcap (20.2 KB) wls3-quic2-us1479.pcap Victor Julien, 02/18/2025 08:20 PM
wls3-quic3-us1398.pcap (5.86 KB) wls3-quic3-us1398.pcap Victor Julien, 02/19/2025 08:33 AM
wls3-quic3-us992.pcap (2.48 KB) wls3-quic3-us992.pcap Victor Julien, 02/19/2025 08:33 AM
wls3-quic3-us2041.pcap (42.6 KB) wls3-quic3-us2041.pcap Victor Julien, 02/19/2025 08:33 AM
clipboard-202502191120-b98nf.png (58.4 KB) clipboard-202502191120-b98nf.png Victor Julien, 02/19/2025 10:21 AM
wls3-quic5-us124.pcap (17.7 KB) wls3-quic5-us124.pcap Victor Julien, 02/19/2025 10:21 AM
clipboard-202502201225-vx4hq.png (217 KB) clipboard-202502201225-vx4hq.png Victor Julien, 02/20/2025 11:26 AM
wls3-quic9-us335.pcap (42.4 KB) wls3-quic9-us335.pcap Victor Julien, 02/20/2025 11:27 AM

Subtasks 1 (1 open0 closed)

Bug #7557: quic: valid traffic blocked in IPS mode (7.0.x backport)AssignedPhilippe AntoineActions
Actions #1

Updated by OISF Ticketbot 8 days ago

  • Subtask #7557 added
Actions #2

Updated by OISF Ticketbot 8 days ago

  • Label deleted (Needs backport to 7.0)
Actions #4

Updated by Philippe Antoine 5 days ago

  • Status changed from Assigned to In Review
Actions #5

Updated by Victor Julien 5 days ago

Attached another example, here there are quite a lot of crypto frames split over 2 packets.

Actions #7

Updated by Victor Julien 5 days ago ยท Edited

Not sure if this is a related issue, but this gave me a warning alert as well.

Actions #8

Updated by Philippe Antoine 5 days ago

Victor Julien wrote in #note-7:

Not sure if this is a related issue, but this gave me a warning alert as well.

Not exactly related, but I pushed a simple fix and the SV test for this see https://github.com/OISF/suricata/pull/12593 latest commit

Actions #9

Updated by Victor Julien 4 days ago

Example of a server hello with out of order fragments.

Actions #11

Updated by Philippe Antoine 4 days ago

I am adding a fix for wls3-quic2-us7.pcap

For wls3-quic2-us670-pkn-32.pcap it is strange to see packet 5 being protected before seeing the tls hello in packet 9

I do not see anything else interesting in the other pcaps (beyond my fix)

Actions #14

Updated by Philippe Antoine 3 days ago

Victor Julien wrote in #note-13:

Another odd one.

This is a new one : quic retry packets (which reset the keys) handled in PR v7 with a new small commit

Updated by Victor Julien 2 days ago

Here is another odd one. Init, retry, init, retry. But it seems the last retry is invalid?

Actions #17

Updated by Philippe Antoine 1 day ago

  • Status changed from In Review to Resolved
Actions

Also available in: Atom PDF