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

Seccomp default policy is missing clock_nanosleep #33792

Closed
izaneuski opened this issue Nov 23, 2022 · 2 comments · Fixed by #33831
Closed

Seccomp default policy is missing clock_nanosleep #33792

izaneuski opened this issue Nov 23, 2022 · 2 comments · Fixed by #33831
Labels
bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@izaneuski
Copy link

On some ubuntu hosts I'm facing high CPU consumption by auditbeat(7.16.3&8.5.1) and journalbeat(7.15.2) with default config.
During investigation with strace found out:

clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=100000000}, NULL) = -1 EPERM (Operation not permitted)
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=100000000}, NULL) = -1 EPERM (Operation not permitted)
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=100000000}, NULL) = -1 EPERM (Operation not permitted)

Fixed by adding to beat config:

seccomp:
  syscalls:
  - action: allow
    names:
    - clock_nanosleep
  • Version:
ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
  • Operating System:
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
uname -a
Linux ip-10-224-140-239 5.15.0-1023-aws #27~20.04.1-Ubuntu SMP Wed Oct 26 20:02:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 23, 2022
@belimawr belimawr added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Nov 23, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 23, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@cmacknz cmacknz added the bug label Nov 23, 2022
andrewkroh added a commit to andrewkroh/beats that referenced this issue Nov 28, 2022
andrewkroh added a commit that referenced this issue Nov 29, 2022
…3831)

* Add clock_nanosleep to seccomp allowlist

Fixes #33792

* Update github.com/elastic/go-seccomp-bpf to v1.3.0

It added support for Linux v6.0 syscall names.
mergify bot pushed a commit that referenced this issue Nov 29, 2022
…3831)

* Add clock_nanosleep to seccomp allowlist

Fixes #33792

* Update github.com/elastic/go-seccomp-bpf to v1.3.0

It added support for Linux v6.0 syscall names.

(cherry picked from commit 141ad33)
andrewkroh added a commit that referenced this issue Nov 30, 2022
…3831) (#33869)

* Add clock_nanosleep to seccomp allowlist

Fixes #33792

* Update github.com/elastic/go-seccomp-bpf to v1.3.0

It added support for Linux v6.0 syscall names.

(cherry picked from commit 141ad33)

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
chrisberkhout pushed a commit that referenced this issue Jun 1, 2023
…3831)

* Add clock_nanosleep to seccomp allowlist

Fixes #33792

* Update github.com/elastic/go-seccomp-bpf to v1.3.0

It added support for Linux v6.0 syscall names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants