-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix/overlapping tcp segments #1898
Conversation
cadbbc5
to
026d4fd
Compare
delta := lastSeq - tcpStartSeq | ||
|
||
// if 'overlap' already covered by previous packet -> return | ||
if int(delta) >= len(pkt.Payload) { |
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.
Should we add at least a debug log message here?
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.
debug message is ok. but this is perfectly valid behavior.
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.
rethinking this case, it's impossible to trigger this condition due to tcpSeq already compared to lastSeq and if reset, packet is dropped.
LGTM. Worth backporting? |
Yeah. in presence of overlapping resends, application layer parser are likely to trip or generate panic. |
I added the backport layer. There seem to be quite some packetbeat system tests that are failing ... |
31634fb
to
18ebe01
Compare
18ebe01
to
5401d12
Compare
5401d12
to
c44d735
Compare
* TCP table driven unit test * Fix tcp segments overlaps
* TCP table driven unit test * Fix tcp segments overlaps
No description provided.