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

stream-tcp-reassemble: fix reassembly direction for FIN packets #6686

Conversation

amirabell
Copy link
Contributor

Suricata invokes the stream reassembly logic only for the current packet
direction if the packet contains a FIN flag. However, this does not
handle the case in which the packet ACKs data from the opposing direction.
This patch forces the invocation of the stream reassembly logic
on both direction when Suricata sees a FIN packet.

Make sure these boxes are signed before submitting your Pull Request -- thank you.

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

Describe changes:
-Set direction to UPDATE_DIR_BOTH FIN-ACK packets

#suricata-verify-pr:OISF/suricata-verify#599
#suricata-verify-repo:
#suricata-verify-branch:
#suricata-update-pr:
#suricata-update-repo:
#suricata-update-branch:
#libhtp-pr:
#libhtp-repo:
#libhtp-branch:

Previous PR: #6685

Suricata invokes the stream reassembly logic only for the current packet
direction if the packet contains a FIN flag. However, this does not
handle the case in which the packet ACKs data from the opposing direction.
This patch forces the invocation of the stream reassembly logic
on both direction when Suricata sees a FIN packet.
dir = UPDATE_DIR_BOTH;
} else {
dir = UPDATE_DIR_PACKET;
}
Copy link
Member

@inashivb inashivb Dec 9, 2021

Choose a reason for hiding this comment

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

Hi @amirabell ! Thank you for your work! :)
formatting seems to be off here. Could you please check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am sorry, I didn't notice. Opened a new PR: #6693

@amirabell amirabell closed this Dec 9, 2021
lukashino added a commit to lukashino/suricata that referenced this pull request Jan 16, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Jan 16, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Mar 2, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Mar 11, 2024
@amirabell amirabell deleted the fix-stream-reassembly-update-on-fin-v3 branch March 27, 2024 06:45
lukashino pushed a commit to lukashino/suricata that referenced this pull request Apr 9, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Apr 11, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Apr 11, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Apr 14, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Apr 14, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Apr 14, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Apr 14, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Apr 14, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request May 28, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request May 28, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request May 28, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request May 29, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request May 30, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Jun 3, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Jun 8, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Jun 8, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Jun 8, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Jun 8, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jun 15, 2024
lukashino pushed a commit to lukashino/suricata that referenced this pull request Jun 18, 2024
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.

2 participants