-
Notifications
You must be signed in to change notification settings - Fork 5k
[auditbeat] Allow memfd_create(2) in seccomp for add_session_metadata… #41297
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
Conversation
…@ebpf
Quark was falling back into kprobe since ebpf would fail with EPERM at
memfd_create(2).
```
$ strace -f auditbeat ....
[pid 2917] memfd_create("libbpf-placeholder-fd", MFD_CLOEXEC) = -1 EPERM (Operation not permitted)
```
With this my test case where kprobe is disabled now uses ebpf when I select
backend "auto", before it was falling back to procfsprovider.
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
|
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
The whole idea of "the user should not even know which backend is being used", worked a bit too much. This was prompted by a bug in beats where seccomp was blocking a syscall needed for EBPF, and so it fell back to kprobe all the time and the user had no proper way to notice this. Related to elastic/beats#41297 Purposedly stashed this into stats to make it hard to retrieve from quark.c, if we start doing `if (qq->backend == QQ_EBPF)` we lost the war.
…@ebpf (#41297) Quark was falling back into kprobe since ebpf would fail with EPERM at memfd_create(2). ``` $ strace -f auditbeat .... [pid 2917] memfd_create("libbpf-placeholder-fd", MFD_CLOEXEC) = -1 EPERM (Operation not permitted) ``` With this my test case where kprobe is disabled now uses ebpf when I select backend "auto", before it was falling back to procfsprovider. (cherry picked from commit 6766cfa)
…@ebpf (#41297) Quark was falling back into kprobe since ebpf would fail with EPERM at memfd_create(2). ``` $ strace -f auditbeat .... [pid 2917] memfd_create("libbpf-placeholder-fd", MFD_CLOEXEC) = -1 EPERM (Operation not permitted) ``` With this my test case where kprobe is disabled now uses ebpf when I select backend "auto", before it was falling back to procfsprovider. (cherry picked from commit 6766cfa)
…@ebpf (elastic#41297) Quark was falling back into kprobe since ebpf would fail with EPERM at memfd_create(2). ``` $ strace -f auditbeat .... [pid 2917] memfd_create("libbpf-placeholder-fd", MFD_CLOEXEC) = -1 EPERM (Operation not permitted) ``` With this my test case where kprobe is disabled now uses ebpf when I select backend "auto", before it was falling back to procfsprovider.
The whole idea of "the user should not even know which backend is being used", worked a bit too much. This was prompted by a bug in beats where seccomp was blocking a syscall needed for EBPF, and so it fell back to kprobe all the time and the user had no proper way to notice this. Related to elastic/beats#41297 Purposedly stashed this into stats to make it hard to retrieve from quark.c, if we start doing `if (qq->backend == QQ_EBPF)` we lost the war.
…@ebpf (#41297) (#41316) Quark was falling back into kprobe since ebpf would fail with EPERM at memfd_create(2). ``` $ strace -f auditbeat .... [pid 2917] memfd_create("libbpf-placeholder-fd", MFD_CLOEXEC) = -1 EPERM (Operation not permitted) ``` With this my test case where kprobe is disabled now uses ebpf when I select backend "auto", before it was falling back to procfsprovider. (cherry picked from commit 6766cfa) Co-authored-by: Christiano Haesbaert <[email protected]>
…@ebpf (#41297) (#41317) Quark was falling back into kprobe since ebpf would fail with EPERM at memfd_create(2). ``` $ strace -f auditbeat .... [pid 2917] memfd_create("libbpf-placeholder-fd", MFD_CLOEXEC) = -1 EPERM (Operation not permitted) ``` With this my test case where kprobe is disabled now uses ebpf when I select backend "auto", before it was falling back to procfsprovider. (cherry picked from commit 6766cfa) Co-authored-by: Christiano Haesbaert <[email protected]>
…@ebpf
Quark was falling back into kprobe since ebpf would fail with EPERM at memfd_create(2).
With this my test case where kprobe is disabled now uses ebpf when I select backend "auto", before it was falling back to procfsprovider.
Proposed commit message
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksI have added an entry inCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Change QQ_ALL_BACKENDS to QQ_EBPF and kerneltracingprovider will fallback into procfs, with the fix it doesn't.