-
Notifications
You must be signed in to change notification settings - Fork 382
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
bpf: fix missed linux_binprm_type in selector_arg_offset function #2623
Conversation
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
76445c1
to
6818e16
Compare
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
There is a test failure, which seems related:
|
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.
Need to work out why the ARM test is failing.
Yes, I'll look at failing tests. |
It might be that the tests themselves are broken. |
Yep it seems test itself is broken: tetragon/pkg/sensors/tracing/kprobe_test.go Lines 6029 to 6031 in e44f7df
It should be "Equal", "In" does not exist for matchArgs .
It bypasses validation since it doesn't pass YAML unmarshalling. I just tried changing the exec command and the test passes all the time, it needs a fix! I'm writing something. |
@anfedotoff I have a patch for the test that actually fails without your patch and succeeds with your patch (which should have been what happened previously), is it okay if I push to your branch? |
I created #2624 so that I can run the tests from there. We can merge like this with your commit authored to you. Or I can merge the fix of the test and then we fix your patch, however you prefer. |
Thanks, yes, sure! |
I think, the easiest way is to merge your PR with my commit and your test fix. |
Ok we can do that, then given your patch, my test failed on 4.19 since it doesn't have large progs. If it's expected we should just skip this test! |
Yes, I think it is expected. We use large progs to copy args of this type, if I'm not mistaken. |
Hmm, why's it failing some tests on bpf-next? |
Signed-off-by: Andrei Fedotov <[email protected]>
The test was broken in two ways: - First it was using the "In" operator with MatchArgs, which does not exist. "Equal" should be used. It can be confusing because MatchBinaries uses "In". It bypasses validation since it provided the Go object without using the YAML unmarshalling. - Secondly, it was only checking that the event existed without checking that the filtering actually happened. We can check the "lack" of event in addition to the presence of it thanks to the way this test is written, using the perfring.RunTestEvents. This test should have detected the issue fixed by the following patch. Signed-off-by: Mahe Tardy <[email protected]>
Signed-off-by: Andrei Fedotov <[email protected]>
0bd2cb8
to
adff394
Compare
It seems to me, that changes it the PR don't influence on this test. I rebased this branch on current main, let's look at the tests. |
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.
Thanks! I think the fix is complete now :)
It's seems to me, that
case linux_binprm_type:
in selector_arg_offset function is missing. security_bprm_check.yaml from examples doesn't work.