-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Next/20220329/v3 #7187
Merged
Merged
Next/20220329/v3 #7187
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With this check, on the first packet of a certificate presenting a length of 16Mbytes, we only allocate up to 65Kb When we get to the point where need more than 65Kb, we realloc to the true size. With this check, it makes it more expensive for an attacket to use this allocation as a way to trigger ressource exhaustion...
Ticket: 4860 instead of root field
The documentation was showing an invalid path for running single tests.
Moved devguide dir into userguide dir. Since the devguide is now incorporated as the last chapter of the userguide, removed build and configuration files from the devguide dir, as these are no longer needed. Task OISF#4909
Make it more evident that the sequence diagrams in the transactions page are generated with Mscgen
Currently, it seems easier to upload the diagram images to git than to try to make the image generation script work with out of the tree builds and other corner cases. This means, however, that one must activelly remember to update msc diagram files, run the script and re-add new png files, if those ever need to be updated. To raise awareness to that, a watermark was added to the diagram images. Also removed configuration steps that added mscgen as dependency (locally and for workflow builds and readthedocs).
This uses the date of doc generation to determine the copyright date for the trailing date. Based on Jeff Lucovsky solution.
Use it to explain how to go about the sequence diagram images (generation, updating, what is mscgen etc). Also remove portion that referred to Sphinx builds, as these don't make sense now.
Meant to find more cases where there is a mismatch.
Instead of closing files in both direction when receiving a close request, close only toserver files for the request and close toclient on receiving a response.
Increment files_opened for tx that 'gets' reassembled ranged file
The current code doesn't cover all rows when more than one flow manager is used. It leaves a single row between ftd->max and ftd->min of the next manager orphaned. As an example: hash_size=1000 flowmgr_number=3 range=333 instance ftd->min ftd->max 0 0 333 1 334 666 2 667 1000 Rows not covered: 333, 666
Codecov Report
@@ Coverage Diff @@
## master #7187 +/- ##
==========================================
- Coverage 78.13% 78.10% -0.04%
==========================================
Files 628 628
Lines 184541 184545 +4
==========================================
- Hits 144199 144131 -68
- Misses 40342 40414 +72
Flags with carried forward coverage won't be shown. Click here to find out more. |
jasonish
approved these changes
Mar 29, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Information:
Pipeline 6682 |
This was referenced Mar 30, 2022
Closed
victorjulien
added a commit
to victorjulien/suricata
that referenced
this pull request
Jul 31, 2024
In the DCERPC over TCP pcap, logging and rule matching is disrupted by adding a simple rule: alert tcp any any -> any any (flow:to_server,established; \ dce_iface:5d2b62aa-ee0a-4a95-91ae-b064fdb471fc; dce_opnum:1; \ dce_stub_data; content:"|42 77 4E 6F 64 65 49 50 2E 65 78 65 20|"; \ content:!"|00|"; within:100; distance:97; sid:1; rev:1; ) Works: alert + 3 dcerpc records. But when adding a trivial rule: alert tcp any any -> any any (flow:to_server,established; \ dce_iface:5d2b62aa-ee0a-4a95-91ae-b064fdb471fc; dce_opnum:1; \ dce_stub_data; content:"|42 77 4E 6F 64 65 49 50 2E 65 78 65 20|"; \ content:!"|00|"; within:100; distance:97; sid:1; rev:1; ) alert tcp any any -> any any (dsize:3; sid:2; rev:1; ) The alert for sid:1 disappears and also there is one dcerpc event less. In the single rule case we can aggressively free the transactions, as there is only an sgh in the toserver direction. This means that when we encounter the 2nd REQUEST, the first 2 transactions have already been processed and freed. So for the 2nd REQUEST we open a new TX and run inspection and logging on it. When the 2nd rule is added, it adds toclient sgh as well. This means that we will now slightly delay the freeing of the transactions. As a consequence we still have the TX for the first REQUEST when the 2nd REQUEST is parsed. This leads to the 2nd REQUEST re-using the TX. Since the TX is already marked as inspected, it means the toserver rule now no longer matches. Also we're not logging this TX correctly now. This commit fixes the issue by not "finding" a TX that as already been marked complete in the search direction. Bug OISF#7187.
victorjulien
added a commit
to victorjulien/suricata
that referenced
this pull request
Sep 11, 2024
In the DCERPC over TCP pcap, logging and rule matching is disrupted by adding a simple rule: alert tcp any any -> any any (flow:to_server,established; \ dce_iface:5d2b62aa-ee0a-4a95-91ae-b064fdb471fc; dce_opnum:1; \ dce_stub_data; content:"|42 77 4E 6F 64 65 49 50 2E 65 78 65 20|"; \ content:!"|00|"; within:100; distance:97; sid:1; rev:1; ) Works: alert + 3 dcerpc records. But when adding a trivial rule: alert tcp any any -> any any (flow:to_server,established; \ dce_iface:5d2b62aa-ee0a-4a95-91ae-b064fdb471fc; dce_opnum:1; \ dce_stub_data; content:"|42 77 4E 6F 64 65 49 50 2E 65 78 65 20|"; \ content:!"|00|"; within:100; distance:97; sid:1; rev:1; ) alert tcp any any -> any any (dsize:3; sid:2; rev:1; ) The alert for sid:1 disappears and also there is one dcerpc event less. In the single rule case we can aggressively free the transactions, as there is only an sgh in the toserver direction. This means that when we encounter the 2nd REQUEST, the first 2 transactions have already been processed and freed. So for the 2nd REQUEST we open a new TX and run inspection and logging on it. When the 2nd rule is added, it adds toclient sgh as well. This means that we will now slightly delay the freeing of the transactions. As a consequence we still have the TX for the first REQUEST when the 2nd REQUEST is parsed. This leads to the 2nd REQUEST re-using the TX. Since the TX is already marked as inspected, it means the toserver rule now no longer matches. Also we're not logging this TX correctly now. This commit fixes the issue by not "finding" a TX that as already been marked complete in the search direction. Bug OISF#7187.
victorjulien
added a commit
to victorjulien/suricata
that referenced
this pull request
Sep 23, 2024
In the DCERPC over TCP pcap, logging and rule matching is disrupted by adding a simple rule: alert tcp any any -> any any (flow:to_server,established; \ dce_iface:5d2b62aa-ee0a-4a95-91ae-b064fdb471fc; dce_opnum:1; \ dce_stub_data; content:"|42 77 4E 6F 64 65 49 50 2E 65 78 65 20|"; \ content:!"|00|"; within:100; distance:97; sid:1; rev:1; ) Works: alert + 3 dcerpc records. But when adding a trivial rule: alert tcp any any -> any any (flow:to_server,established; \ dce_iface:5d2b62aa-ee0a-4a95-91ae-b064fdb471fc; dce_opnum:1; \ dce_stub_data; content:"|42 77 4E 6F 64 65 49 50 2E 65 78 65 20|"; \ content:!"|00|"; within:100; distance:97; sid:1; rev:1; ) alert tcp any any -> any any (dsize:3; sid:2; rev:1; ) The alert for sid:1 disappears and also there is one dcerpc event less. In the single rule case we can aggressively free the transactions, as there is only an sgh in the toserver direction. This means that when we encounter the 2nd REQUEST, the first 2 transactions have already been processed and freed. So for the 2nd REQUEST we open a new TX and run inspection and logging on it. When the 2nd rule is added, it adds toclient sgh as well. This means that we will now slightly delay the freeing of the transactions. As a consequence we still have the TX for the first REQUEST when the 2nd REQUEST is parsed. This leads to the 2nd REQUEST re-using the TX. Since the TX is already marked as inspected, it means the toserver rule now no longer matches. Also we're not logging this TX correctly now. This commit fixes the issue by not "finding" a TX that as already been marked complete in the search direction. Bug OISF#7187. (cherry picked from commit 65392c0)
victorjulien
added a commit
to victorjulien/suricata
that referenced
this pull request
Sep 24, 2024
In the DCERPC over TCP pcap, logging and rule matching is disrupted by adding a simple rule: alert tcp any any -> any any (flow:to_server,established; \ dce_iface:5d2b62aa-ee0a-4a95-91ae-b064fdb471fc; dce_opnum:1; \ dce_stub_data; content:"|42 77 4E 6F 64 65 49 50 2E 65 78 65 20|"; \ content:!"|00|"; within:100; distance:97; sid:1; rev:1; ) Works: alert + 3 dcerpc records. But when adding a trivial rule: alert tcp any any -> any any (flow:to_server,established; \ dce_iface:5d2b62aa-ee0a-4a95-91ae-b064fdb471fc; dce_opnum:1; \ dce_stub_data; content:"|42 77 4E 6F 64 65 49 50 2E 65 78 65 20|"; \ content:!"|00|"; within:100; distance:97; sid:1; rev:1; ) alert tcp any any -> any any (dsize:3; sid:2; rev:1; ) The alert for sid:1 disappears and also there is one dcerpc event less. In the single rule case we can aggressively free the transactions, as there is only an sgh in the toserver direction. This means that when we encounter the 2nd REQUEST, the first 2 transactions have already been processed and freed. So for the 2nd REQUEST we open a new TX and run inspection and logging on it. When the 2nd rule is added, it adds toclient sgh as well. This means that we will now slightly delay the freeing of the transactions. As a consequence we still have the TX for the first REQUEST when the 2nd REQUEST is parsed. This leads to the 2nd REQUEST re-using the TX. Since the TX is already marked as inspected, it means the toserver rule now no longer matches. Also we're not logging this TX correctly now. This commit fixes the issue by not "finding" a TX that as already been marked complete in the search direction. Bug OISF#7187. (cherry picked from commit 65392c0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Staging:
suricata-verify-pr: 796