8000 Policies mntns issue and Segfault fix by rafaeldtinoco · Pull Request #2974 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Policies mntns issue and Segfault fix #2974

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 2 commits into from
Apr 4, 2023
Merged

Policies mntns issue and Segfault fix #2974

merged 2 commits into from
Apr 4, 2023

Conversation

rafaeldtinoco
Copy link
Contributor

1. Explain what the PR does

commit 57fcacd (HEAD -> policy-issues, rafaeldtinoco/policy-issues)
Author: Rafael David Tinoco rafaeldtinoco@gmail.com
Date: Mon Apr 3 23:43:23 2023

policy: cmd/flags: fix incorrect mntns filter name

- .. orelse when used, the following error is returned:

    {"level":"fatal","ts":1680575946.4342806,"msg":"App","error":
    "invalid filter option specified (mntNS!=100), use '--filter
    help' for more info"}

- Update test to also try to create the Policies based on test data.

commit d1fdfc0
Author: Rafael David Tinoco rafaeldtinoco@gmail.com
Date: Tue Apr 4 00:50:19 2023

fix: fix segfaults when ctrl+c is too fast

When aborting tracee right in the beginning, user might face segfaults:

panic: runtime error: invalid memory address or nil pointer dereference
...

goroutine 71 [running]:
github.com/aquasecurity/tracee/pkg/ebpf.(*Tracee).deriveEvents.func1()
        ... base/pkg/ebpf/events_pipeline.go:442 +0x185

or

goroutine 109 [running]:
github.com/aquasecurity/tracee/pkg/ebpf.(*Tracee).engineEvents.func1()
        ... base/pkg/ebpf/signature_engine.go:32 +0x19c

This commit fixes this issue.

When aborting tracee right in the beginning, user might face segfaults:

panic: runtime error: invalid memory address or nil pointer dereference
...

goroutine 71 [running]:
github.com/aquasecurity/tracee/pkg/ebpf.(*Tracee).deriveEvents.func1()
        ... base/pkg/ebpf/events_pipeline.go:442 +0x185

or

goroutine 109 [running]:
github.com/aquasecurity/tracee/pkg/ebpf.(*Tracee).engineEvents.func1()
        ... base/pkg/ebpf/signature_engine.go:32 +0x19c

This commit fixes this issue.
- .. orelse when used, the following error is returned:

    {"level":"fatal","ts":1680575946.4342806,"msg":"App","error":
    "invalid filter option specified (mntNS!=100), use '--filter
    help' for more info"}

- Update tests to also try to create the Policies based on test data.
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

@rafaeldtinoco rafaeldtinoco merged commit bc31a5d into aquasecurity:main Apr 4, 2023
@rafaeldtinoco rafaeldtinoco deleted the policy-issues branch April 4, 2023 12:52
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.

2 participants
0