8000 sets: default set can't have network events v419 by rafaeldtinoco · Pull Request #2771 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sets: default set can't have network events v419 #2771

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

Merged
merged 3 commits into from
Mar 3, 2023
Merged

sets: default set can't have network events v419 #2771

merged 3 commits into from
Mar 3, 2023

Conversation

rafaeldtinoco
Copy link
Contributor
@rafaeldtinoco rafaeldtinoco commented Feb 27, 2023

Description

Commit 0601f09 added network events to the default set but, since the default set is used for all versions, this broke v419 runs, as that version does not support network events.

commit a8a0d37 (HEAD -> v419-fix, rafaeldtinoco/v419-fix)
Author: Rafael David Tinoco rafaeldtinoco@gmail.com
Date: Wed Mar 1 01:59:53 2023

filter: mitigate v4.19 lack of network events

The default event set includes some net_packet events, but they're
not supported in vanilla v4.19 kernels. This patch mitigates this
issue by adding all the network related events to an exclusion list
during the filter events preparation phase.

Fixes: #2771

Note: This mitigation should be removed as soon as tracee has the
      feature probe mechanism in place.

commit e2d52ad
Author: Rafael David Tinoco rafaeldtinoco@gmail.com
Date: Wed Mar 1 02:30:42 2023

libbpfgo error callbacks: mitigate v4.19 map xattr

Fixes: #1602

commit 03edd7b
Author: Rafael David Tinoco rafaeldtinoco@gmail.com
Date: Wed Mar 1 01:58:30 2023

chore: events: keep network related events at the end

@rafaeldtinoco
Copy link
Contributor Author

The focal419 runner is running with clang13 and golang1.18 for these last tests. Will have to update it to clang14 and golang1.19 so this runner is the same as all others (and re-check to see if tests still pass). If tests pass, then we're good for v419 (for the release).

@rafaeldtinoco
Copy link
Contributor Author
rafaeldtinoco commented Feb 27, 2023

@yanivagman FYIO,

Yes, so.. besides this fix, which tests didn't catch because they don't run the default set of events, there is another problem that raised when bumping go to 1.19 and clang to 14:

image

This wan't caught before because the runner, despite having go1.19, was still running tests using go1.18 (due to bad GOHOME env variable).

So, the summary is:

  • this fix is needed for v4.19
  • v4.19 only works with go1.18 and clang13
  • v4.19 with go1.19 and clang14 has the errors of the latest test.

ACTION: will have to understand why clang14 and go1.19 brake v4.19.

@yanivagman
Copy link
Collaborator
  • commit 0601f09 added network events to the default set but, since the default set is used for all versions, this broke v419 runs, as that version does not support network events.

This fix is a valid workaround, but for the long term we will need to identify if network events are supported on the environment where we run, and according to that choose which events can be enabled and which can't

@yanivagman
Copy link
Collaborator

ACTION: will have to understand why clang14 and go1.19 brake v4.19.

My guess is that clang is causing this, and not go1.19.
For now, can we use clang13 and go1.19?

@rafaeldtinoco
Copy link
Contributor Author

ACTION: will have to understand why clang14 and go1.19 brake v4.19.

My guess is that clang is causing this, and not go1.19. For now, can we use clang13 and go1.19?

@geyslan can we ? I remember you said you needed 1.19 for your latest changes.

@geyslan
Copy link
Member
geyslan commented Feb 27, 2023

ACTION: will have to understand why clang14 and go1.19 brake v4.19.

My guess is that clang is causing this, and not go1.19. For now, can we use clang13 and go1.19?

@geyslan can we ? I remember you said you needed 1.19 for your latest changes.

For sure, atomic.Bool comes in 1.19. But if not possible I can re-implement it directly in tracee.

@rafaeldtinoco
Copy link
Contributor Author

For sure, atomic.Bool comes in 1.19. But if not possible I can re-implement it directly in tracee.

Alright, I'll give it another hour to see if I can discover what is going on, then if not possible we can try getting a workaround from you (for the release) if you don't mind. Thank you!

@geyslan
Copy link
Member
geyslan commented Feb 27, 2023

For sure, atomic.Bool comes in 1.19. But if not possible I can re-implement it directly in tracee.

Alright, I'll give it another hour to see if I can discover what is going on, then if not possible we can try getting a workaround from you (for the release) if you don't mind. Thank you!

Just don't bother rushing this, since I've pulled #2762 from v0.13. It's not a priority.

@rafaeldtinoco
Copy link
Contributor Author

Just don't bother rushing this, since I've pulled #2762 from v0.13. It's not a priority.

The v419 runner has go1.19 and clang-13 now, I think it will be good. I'm opening an issue for the clang14 + kernel 4.19 issue.

@rafaeldtinoco
Copy link
Contributor Author

I have opened #2772 for the clang14 + v4.19 issue.

Will try to get network events out of the default set when running in a v4.19 kernel (that is not RHEL or similar).

Copy link
Member
@geyslan geyslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM.

The default event set includes some net_packet events, but they're
not supported in vanilla v4.19 kernels. This patch mitigates this
issue by adding all the network related events to an exclusion list
during the filter events preparation phase.

Fixes: #2771

Note: This mitigation should be removed as soon as tracee has the
      feature probe mechanism in place.
Copy link
Member
@geyslan geyslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aqua-ci
Copy link
aqua-ci commented Mar 1, 2023

[ERROR] GitHub self host service failed connecting to GitHub. Infrastrcuture team has been updated as wel, please hold until investigation.

@rafaeldtinoco
Copy link
Contributor Author

@geyslan please merge this once you're okay with e2e tests (at least to consider another merge).

@rafaeldtinoco rafaeldtinoco merged commit 555c2f6 into aquasecurity:main Mar 3, 2023
@rafaeldtinoco rafaeldtinoco deleted the v419-fix branch March 3, 2023 05:54
AnaisUrlichs pushed a commit to AnaisUrlichs/tracee that referenced this pull request Mar 3, 2023
The default event set includes some net_packet events, but they're
not supported in vanilla v4.19 kernels. This patch mitigates this
issue by adding all the network related events to an exclusion list
during the filter events preparation phase.

Fixes: aquasecurity#2771

Note: This mitigation should be removed as soon as 
763C
tracee has the
      feature probe mechanism in place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0