-
Notifications
You must be signed in to change notification settings - Fork 384
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
Extract path from linux_binprm in security_bprm_check #1983
Comments
Hey, thanks for the issue and the PR, that's quite some work. First, out of curiosity, I wanted to ask why you need Then, regardless of the above point, it's still interesting to add the |
This is answered here #1986 (comment) , the https://github.com/cilium/tetragon/blob/main/examples/tracingpolicy/process-exec/process-exec-elf-begin.yaml we have only triggers for flat and elf binaries where there are scripts script.sh misc binaries etc
Also answered in same response, linux_binprm in that PR does include path which we should abstract or around file of binprm, so we keep flexibility for the future , there are still lot of other usecases to do with binprm |
For example,
Agreed. I think for now we only want to extract the path, so maybe we wait until we have other users of something other than the path in |
All right! we may add it before next release or after release depends, but yeh all good ;-) |
Done by #1986. |
Is there an existing issue for this?
Is your feature request related to a problem?
No response
Describe the feature you would like
With respect to TOCTOU issues, the most atomic way to block execution of a file is via the LSM hook
security_bprm_check
. This function is executed immediately before the kernel launches a new program, during its search for a handler for the format of the file being executed.In order to write a
TracingPolicy
using the path provided tosecurity_bprm_check
, we need to add support to Tetragon for extracting the path fromstruct linux_binprm
, the only argument tosecurity_bprm_check
.Testing
The following new
process_kprobe
was generated by runningsample-exec
with the following TracingPolicy:New
process_kprobe
forsecurity_bprm_check
eventsTracingPolicy
sample-exec
Describe your proposed solution
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: