Repository navigation
Conversation
Signed-off-by: Luca Guerra <luca.guerra@sysdig.com>
Signed-off-by: Luca Guerra <luca.guerra@sysdig.com>
Signed-off-by: Luca Guerra <luca.guerra@sysdig.com>
|
Welcome @luca-sd! It looks like this is your first PR to falcosecurity/libs 🎉 |
|
Hi @luca-sd. Thanks for your PR. I'm waiting for a falcosecurity member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/ok-to-test |
|
@luca-sd you can probably rebase this and test again for bpf now that the fixes for clang 10 are in. |
| struct inode *inode = _READ(exe_file->f_inode); | ||
| if (inode) { | ||
| // XXX if I remove the following two lines this compiles and runs under clang-7 | ||
| is_exe_writable |= (inode_permission(inode, MAY_WRITE) == 0); |
There was a problem hiding this comment.
@luca-sd - as discussed privately we can't do this kind of call in this context. I'll be happy to help in getting that rewritten for eBPF or for another review once that is done.
There was a problem hiding this comment.
It makes sense, thanks for checking. I'll find some time to see if I can come up with an idea to do this in BPF and thanks a lot for the offer to help, I'm going to need it 😄
|
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh with Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle rotten |
|
Rotten issues close after 30d of inactivity. Reopen the issue with Mark the issue as fresh with Provide feedback via https://github.com/falcosecurity/community. |
|
@poiana: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area driver-kmod
/area driver-ebpf
/area libscap
What this PR does / why we need it:
This PR adds the
is_exe_writableflag to execve events, and tracks it as a flag in the process structure. The flag is set if the user running the process has ownership or write access to the executable file.This flag can be meaningful when the user in question is not root (to be more precise, root with CAP_FOWNER). In some scenarios it is interesting to analyze whether or not the regular user that spawned a process wrote its own binary. Sometimes this behavior is not expected and so I feel it is worth having this flag so that it can be used in Falco rules to catch these cases.
Special notes for your reviewer:
Alas, the bpf probe part of this PR is not currently working (verifier fails on the compiled probe). It sounds like this can get better after some improvements to the BPF probe in this PR #5 .
Does this PR introduce a user-facing change?: