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: Extract more QUIC flow details #194

Merged
merged 23 commits into from
Apr 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
72fdac7
QUIC: Extract more QUIC flow details
jmuecke Oct 25, 2023
bd964ef
Fix IPFIX ID collision of QUIC_ZERO_RTT.
jmuecke Oct 31, 2023
d0bbe9f
VN: Add QUIC extension if FLOW_FLUSH. Version = VN is not an error.
jmuecke Oct 31, 2023
4ba9896
<README> Use correct type for CID fields.
jmuecke Oct 31, 2023
1c4f8b8
<quic> 0-RTT collect client CID. But no other CIDs or version.
jmuecke Nov 1, 2023
6825aa4
<quic> Add quic packet type information for each datagram.
jmuecke Nov 2, 2023
85e0975
Enforce CID lengths are within the defined spec. Parse packet type last.
jmuecke Nov 2, 2023
c2dfa2a
Export detected quic server port.
jmuecke Nov 2, 2023
1fab916
vn: Add server port before flushing flow
jmuecke Nov 2, 2023
f6ae322
quic versions: Support all versions triggering vns.
jmuecke Nov 2, 2023
fa271e9
Fix processing of version negotiation eliciting version.
jmuecke Nov 2, 2023
c77c89f
<quic> tested and improved quic module
jmuecke Nov 23, 2023
53ba8f7
<quic> Restrict TLS extraction to alpn and quic_transport parameters
jmuecke Jan 23, 2024
0ecfefb
<quic> Fix text output
jmuecke Jan 24, 2024
531c54a
QUIC - Fix required output IPFIX buffer size
hynekkar Feb 12, 2024
13c522a
QUIC - Fix payload len underflow, when smaller than expected
hynekkar Feb 12, 2024
131613c
QUIC - Avoid source buffer overflow in crypto frame copy
hynekkar Feb 12, 2024
f7b6f44
<quic> Return proper QUIC version.
jmuecke Feb 13, 2024
3cfa8a7
QUIC - Fix IPFIX IDs for basic list elements
hynekkar Feb 15, 2024
71683ab
<quic> Change payload_len only if previously modified.
jmuecke Feb 20, 2024
b3cdfb7
quic - fix code format
SiskaPavel Apr 3, 2024
8a1e370
<quic> Only act on first retry packet
jmuecke Apr 16, 2024
24234d1
test - update reference file of quic test
SiskaPavel Apr 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
<quic> Change payload_len only if previously modified.
  • Loading branch information
jmuecke committed Feb 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 71683abe38b1bdc9c59024f8ceac34726b3a1288
11 changes: 7 additions & 4 deletions process/quic_parser.cpp
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ QUICParser::QUICParser()

header_len = 0;
payload_len = 0;
payload_len_offset = 0;

dcid = nullptr;
dcid_len = 0;
@@ -884,6 +885,8 @@ bool QUICParser::quic_decrypt_payload()
// "These cipher suites have a 16-byte authentication tag and produce an output 16 bytes larger
// than their input." adjust length because last 16 bytes are authentication tag
payload_len -= 16;
payload_len_offset = 16;

memcpy(&atag, &payload[payload_len], 16);
EVP_CIPHER_CTX* ctx;

@@ -1349,11 +1352,11 @@ bool QUICParser::quic_parse_headers(const Packet& pkt, bool forceInitialParsing)
// Session resumption is such a case.
if (!parsed_initial) {
quic_tls_extension_lengths_pos = 0;
initial_dcid_len = dcid_len;
initial_dcid = (uint8_t*) dcid;
// len = 0 forces reading DCID from current packet
initial_dcid_len = 0;
// Increment by tag_len, since subsequent function is not stateless.
payload_len += 16;
// Undo another side effect
payload_len += payload_len_offset;
// Undo side effect from QUICParser::quic_decrypt_initial_header
payload = payload - pkn_len;
payload_len += pkn_len;
quic_parse_initial(pkt, pkt_payload_pointer, offset);
1 change: 1 addition & 0 deletions process/quic_parser.hpp
Original file line number Diff line number Diff line change
@@ -142,6 +142,7 @@ class QUICParser {

uint16_t header_len;
uint64_t payload_len;
uint8_t payload_len_offset;

uint8_t packet_type;
const uint8_t* dcid;