Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: store thread leader caps during fork and reduce false positives
Store the thread leader caps during fork so we can check later if capabilities changed during the execve, just before the execve hook point where we collect new capabilities and a new exec_id. Right now during fork they are zeroed in the execve_map which make it unreliable to detect if they changed between the fork and the final execve. Any hook just before the execve could report that they changed even if they did not, this is the case of a privileged that is as an example executing sudo or su. An event will be generated that capabilities did change (raised) but in reality they did not. As they were zero'ed the caps change comparison will be performed against zero which will always succeed. Fix this by storing caps during fork, and ensure that we only report positive cases. Signed-off-by: Djalal Harouni <[email protected]>
- Loading branch information