-
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
Ossfuzz corp v7 #5837
Ossfuzz corp v7 #5837
Conversation
so as to avoid overrecursion leading to stack exhaustion
@@ -38,6 +38,8 @@ | |||
#include "util-unittest.h" | |||
#include "util-debug.h" | |||
|
|||
#define MAX_ETH_OFFSET 256 |
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.
is this still used?
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.
Indeed, removing in next PR
@@ -887,6 +891,15 @@ void CaptureStatsSetup(ThreadVars *tv, CaptureStats *s); | |||
((p)->action |= a)); \ | |||
} while (0) | |||
|
|||
#define PKT_MAX_DECODED_LAYERS 16 | |||
|
|||
#define PACKET_INCREASE_CHECK_LAYERS(p) do { \ |
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.
I think adding a macro to hides a return statement inside is not a great solution. I understand the desire to keep things tidy, but this is not the way.
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.
ok :-)
Replaced by #5838 |
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/4125
Describe changes:
bytemath
keyword parsingDecodeEthernet
andDecodeMPLS
Modifies #5811 by counting the total number of layers so that too much recursion can't happen anywhere (and adding a field to the structure Packet to do so)