tcp: flag established even on error#10299
Conversation
Follows commit 2fb5059 Setting this flag allows to use the right flow alproto for detect scrathpad, which is then used by packet/stream engines.
|
In bug-2576-02, this PR makes both signatures trigger When only the second one triggers on current version even if the flow's alproto is http |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #10299 +/- ##
===========================================
+ Coverage 73.31% 82.33% +9.02%
===========================================
Files 895 978 +83
Lines 148215 272031 +123816
===========================================
+ Hits 108666 223987 +115321
- Misses 39549 48044 +8495
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
I'm not sure I agree with this change. The idea is that an error packet is faulty, possibly malicious (e.g. injected), so accepting it as part of the established connection seems wrong. |
Do you mean that it should not be associated with the flow ? What do you call accepting it as part of the established connection ? The code What do you think about the test cases ? Does this make sense to you that a flow matches 5, 7 (and 61) but not 6 ? |
|
If a packet is rejected by the stream engine, we shouldn't inspect it as a stream packet (so inspect only the raw payload, not the stream data it's not a part of). |
Makes sense. |
Follows commit 2fb5059, concurrent against #10286
Link to redmine ticket:
Should there be one specific for this ?
Describe changes:
StreamTcpStateDispatchreturning an error value)SV_BRANCH=OISF/suricata-verify#1623