-
Notifications
You must be signed in to change notification settings - Fork 376
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: bump prepend_name underlying buffer size 4096 #2764
Conversation
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
5d77188
to
d6b22ce
Compare
cc @anfedotoff |
3c37657
to
d5ad471
Compare
I bumped into a bug when testing cilium/tetragon#2764 with the current rhel8 kernel and it was later fixed. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
I bumped into a bug when testing cilium/tetragon#2764 with the current rhel8 kernel and it was later fixed. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
I bumped into a rhel8 (rocky 8.6) bug, let's bump to a newer 8.9 that is fixed cilium/little-vm-helper-images#612. |
d5ad471
to
4636210
Compare
4636210
to
5a7165f
Compare
CI looks pretty red ❓ |
oh boy I just rebased and made the tiny change and indeed it seems everything is broken |
5a7165f
to
6ffb5cd
Compare
6ffb5cd
to
f795fab
Compare
I think you need |
We need this because when reading exe for large path (>256) we ended up having only part of the end (since we walk the dentry from end to start) and thus the prefix match wasn't working. We still don't need to keep the whole path, but it needs to be correct. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Adding test that has Prefix operator in matchBinaries selector. The file path of the test binary (true) being executed is larger than 256 bytes: it should be around 3900 chars. Co-authored-by: Mahe Tardy <mahe.tardy@gmail.com> Signed-off-by: Andrei Fedotov <anfedotoff@yandex-team.ru>
f795fab
to
e73a0a0
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
A kernel bug fails to trigger the BPF program hooked on a tracepoint if the binary name passed as parameter is long enough, you can trigger it with a long path, using mtardy/pathgen for example and bpftrace: bpftrace -e 'tracepoint:sched:sched_process_exec { printf("execute\n"); }' Under rhel8.6, if the path is long enough (>3000 for example), the BPF prog will not be triggered. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Fixes #2758
Description
The matchBinaries Prefix operator fails to match a path longer than 256 chars because of the way we read the binary path. We use the exe of the process and walk the dentry from end to beginning. Thus if the path is too long, the buffer contains an incorrect start.
Changelog