Skip to content
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

[BUG] Capabilities enforcement apply only for 1 thread #1813

Closed
3 of 5 tasks
AlonZivony opened this issue Jun 8, 2022 · 4 comments · Fixed by #1819
Closed
3 of 5 tasks

[BUG] Capabilities enforcement apply only for 1 thread #1813

AlonZivony opened this issue Jun 8, 2022 · 4 comments · Fixed by #1819
Assignees
Labels
Milestone

Comments

@AlonZivony
Copy link
Contributor

AlonZivony commented Jun 8, 2022

Prerequisites

  • This affects latest released version.
  • This affects current development tree (origin/HEAD).
  • There isn't an issue describing the bug.

Select one OR another:

  • I'm going to create a PR to solve this (assign to yourself).
  • Someone else should solve this.

Bug description

This bug was discovered while investigating #1803
We noticed that the error message we received isn't received on each run, only for part of them.
When forcing only 1 goroutine, the error occurs in much more runs.
@yanivagman suggested that the current capabilities package change only thread's capabilities, which might not be the thread with reduced capabilities. See the discussion in #1803 for more details.

This is how I'm executing tracee (cmdline):
sudo ./dist/tracee-ebpf -o none -o option:parse-arguments -o option:detect-syscall-trace comm-bash -trace follow

This is the error I'm getting:
Inconsistently, get the following error message:
image

Context

Relevant information about my setup:

  • Linux version: Ubuntu
  • Linux kernel version: 5.13
  • Tracee version (or commit id of your tree): 727e6
@rafaeldtinoco
Copy link
Contributor

I believe we've dropped this from this milestone, right ? Just wanted to make sure @AlonZivony (based on our previous meeting).

@yanivagman
Copy link
Collaborator

I believe we've dropped this from this milestone, right ? Just wanted to make sure @AlonZivony (based on our previous meeting).

I think we should keep it as part of the milestone as we already merged the dropped capabilities PR, but it's implementation is incorrect, which might cause hard to debug issues on some environments due to it being statistically working.

@AlonZivony
Copy link
Contributor Author

I agree with @yanivagman here.
If we can merge it to the current version it would be the best option.
If you can help me close it in time it would be great.

@rafaeldtinoco
Copy link
Contributor

Sure, no objections. I just wanted to confirm that is what we wanted! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants