Skip to content

Encryption bypass 8336 v2#15087

Open
catenacyber wants to merge 3 commits intoOISF:mainfrom
catenacyber:encryption-bypass-8336-v2
Open

Encryption bypass 8336 v2#15087
catenacyber wants to merge 3 commits intoOISF:mainfrom
catenacyber:encryption-bypass-8336-v2

Conversation

@catenacyber
Copy link
Copy Markdown
Contributor

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

Describe changes:

  • detect: do not wait for more in log_flush
  • stream: log flush packets in the other order (as the comment stated)

SV_BRANCH=OISF/suricata-verify#2983

Ticket: 8336

When a packet has flag PKT_PSEUDO_DETECTLOG_FLUSH, we do not
expect to rerun detection on the same tx and direction again

So, do not set mpm_in_progress whose purpose is to not store
the state as we will run again.

Allows transactional bidirectional signatures to work on
thse log+flush pair of packets
Ticket: 8336

At the end of a TLS handshake, in IDS mode, the client acks,
and we parse the server hello and use tls.encryption-handling
to know what to do next (for example bypass)

Everything is parsed, but we have not run detection yet on neither
side.

So, in IDS mode, we need to first flush the client side, as the
comment on the function already stated.
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 22, 2026

Coverage Status

coverage: 79.309% (-0.006%) from 79.315%
when pulling 75f3c50 on catenacyber:encryption-bypass-8336-v2
into 6587e36 on OISF:main.

As we expect a log+flush packet in the other direction

Ticket: 8336
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.58%. Comparing base (6587e36) to head (75f3c50).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15087      +/-   ##
==========================================
- Coverage   82.59%   82.58%   -0.01%     
==========================================
  Files         990      990              
  Lines      271761   271763       +2     
==========================================
- Hits       224465   224444      -21     
- Misses      47296    47319      +23     
Flag Coverage Δ
fuzzcorpus 61.03% <100.00%> (+0.01%) ⬆️
livemode 18.38% <0.00%> (+0.01%) ⬆️
netns 18.34% <0.00%> (-0.03%) ⬇️
pcap 45.22% <100.00%> (-0.04%) ⬇️
suricata-verify 66.10% <100.00%> (-0.04%) ⬇️
unittests 58.83% <40.00%> (-0.01%) ⬇️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@suricata-qa
Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 30469

1 similar comment
@suricata-qa
Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 30469

Comment thread src/stream-tcp.c
ts ^= StreamTcpInlineMode();
StreamTcpPseudoPacketCreateDetectLogFlush(tv, stt, p, ssn, pq, ts^0);
StreamTcpPseudoPacketCreateDetectLogFlush(tv, stt, p, ssn, pq, ts^1);
StreamTcpPseudoPacketCreateDetectLogFlush(tv, stt, p, ssn, pq, ts ^ 0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess clang-format doesn't enforce one style here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was indeed clang-format's doing, and I found it strange but 🤷

Copy link
Copy Markdown
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure about the mpm-in-progres change, but the rest aligns with some initial inspection I did of the issue.

@catenacyber
Copy link
Copy Markdown
Contributor Author

Unsure about the mpm-in-progres change, but the rest aligns with some initial inspection I did of the issue.

Do you see another fix ? Or did you not look into transactional signatures at all ?

@jasonish
Copy link
Copy Markdown
Member

Unsure about the mpm-in-progres change, but the rest aligns with some initial inspection I did of the issue.

Do you see another fix ? Or did you not look into transactional signatures at all ?

Didn't look. Unsure as I didn't look into it. Not "unsure" in that I'm not sure its the best idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants