-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: detect binary execution that raise process capabilities.
Add binary_properties.caps_raised bool if set then the current execution gained new capabilities through binary execution. This happens when the executed binary has: 1. setuid root bit set 2. file capabilities. This is explicitly caps_raised instead of file_caps, as it is hard to inspect from BPF side if the setuid binary execution is a setuid root that raised capabilities or not. To identify that we need from BPF side to check if that uid is explicitly _mapped_ as _root_ id in the current user namespace or one of the parent user namespaces. Currently this is not trivial and we still don't do or plan todo user namespace ids translation in Tetragon. To solve this we abstract it in `caps_raised` field to indicate if the binary execution allowed the process to raise its capabilities which is what users want. The final granted capabilities are listed in the capabilities field of the process execution. The new caps_raised is a bool type, no need to rencode the full capabilities there too, let's just indicate to the user and if they are interested they can inspect other fields that contain the permitted and effective capabilities of the current binary. Signed-off-by: Djalal Harouni <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,361 additions
and
1,273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
860 changes: 437 additions & 423 deletions
860
...thooks/tetragon-oci-hook/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
...thooks/tetragon-oci-hook/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 18 additions & 2 deletions
20
vendor/github.com/cilium/tetragon/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.