Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quic crypto reassembly 7556 v3 #12597

Closed

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7556

Describe changes:

  • quic: handle fragment reassembly

SV_BRANCH=OISF/suricata-verify#2296

#12593 with fix of bug found by cluster fuzz lite : vec![0; crypto_max_size as usize]; would have been arbitrary size allocation

Will alow to have decode_frames accept one additional parameter
with past fragment data
Ticket: 7556

To do so, we need to add 2 buffers (one for each direction)
to the QuicState structure, so that on parsing the second packet
with hello/crypto fragment, we still have the data of the first
hello/crypto fragment.

Use a hardcoded limit so that these buffers cannot grow indefinitely
and set an event when reaching the limit
cf rfc9000 section 19.3. ACK Frames

Ticket: 7556
@catenacyber catenacyber requested a review from a team as a code owner February 17, 2025 15:04
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 81.33333% with 14 lines in your changes missing coverage. Please review.

Project coverage is 80.74%. Comparing base (c861685) to head (97beb68).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12597      +/-   ##
==========================================
+ Coverage   80.73%   80.74%   +0.01%     
==========================================
  Files         931      931              
  Lines      259136   259198      +62     
==========================================
+ Hits       209215   209300      +85     
+ Misses      49921    49898      -23     
Flag Coverage Δ
fuzzcorpus 56.96% <50.68%> (+<0.01%) ⬆️
livemode 19.37% <0.00%> (-0.01%) ⬇️
pcap 44.12% <80.82%> (+<0.01%) ⬆️
suricata-verify 63.43% <80.82%> (+0.01%) ⬆️
unittests 58.33% <29.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@victorjulien victorjulien added the needs rebase Needs rebase to master label Feb 18, 2025
@victorjulien
Copy link
Member

This seems to be a lot cleaner on my network. Still seeing some issues, this time a session with a fragmented server hello, where frags are out of order. Pcap https://redmine.openinfosecfoundation.org/issues/7556?next_issue_id=7555&prev_issue_id=7557#note-9

@catenacyber
Copy link
Contributor Author

Next in #12615

@catenacyber
Copy link
Contributor Author

This seems to be a lot cleaner on my network. Still seeing some issues, this time a session with a fragmented server hello, where frags are out of order. Pcap https://redmine.openinfosecfoundation.org/issues/7556?next_issue_id=7555&prev_issue_id=7557#note-9

The issue was caused by packet 5 not bringing in a new crypto fragment (packet 4 brought a a first one) and so we ended up forgetting the data without having got it all...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs rebase Needs rebase to master
Development

Successfully merging this pull request may close these issues.

2 participants