-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
af-packet: handle null bpf filter - v1 #9468
Conversation
Commit 587c326 made our YAML parser more cmopliant with respect to what should be a NULL value and now when a key contains no value it is NULL instead of an empty string, or something else like a literal "null" or "~". Check that the returned bpf_filter is null before checking strlen. Bug: 6302
I guess we should re-open the discussion on |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #9468 +/- ##
==========================================
- Coverage 82.18% 82.17% -0.02%
==========================================
Files 968 968
Lines 274199 274199
==========================================
- Hits 225363 225329 -34
- Misses 48836 48870 +34
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 15875 |
I was thinking perhaps we could have a cocci script check whether we're checking the NULL values returned in such fn calls and if not, replace the call to |
The number of call sites seems limited, so a manual review/update pass is more appropriate I think. |
A more general solution that matches our usage: #9476 |
Commit 587c326 made our YAML parser
more cmopliant with respect to what should be a NULL value and now when
a key contains no value it is NULL instead of an empty string, or
something else like a literal "null" or "~".
Check that the returned bpf_filter is null before checking strlen.
Bug: https://redmine.openinfosecfoundation.org/issues/6302