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

Undetected syscall error #2061

Open
d4l-w4r opened this issue Jan 25, 2024 · 1 comment
Open

Undetected syscall error #2061

d4l-w4r opened this issue Jan 25, 2024 · 1 comment

Comments

@d4l-w4r
Copy link

d4l-w4r commented Jan 25, 2024

Hi!
I just noticed that sysdig seems to miss a syscall error that is caught by both auditd and strace.
Note: I'm using sysdig without eBPF

When I run the following command from my normal, non-privileged user

[ -r /root ] || echo "not root"

sysdig correctly catches that the syscall faccessat2 is used by this expression, however no correspondingEACCES error is found in the "Errors" view of csysdig.

When using the same expression with strace, I get the following line in the output:
access("/root", R_OK) = -1 EACCES (Permission denied)

And also auditd will log this EACCES (13) event when I add the rule -a always,exit -S all -F exit=-EACCES:
type=SYSCALL (...) syscall=439 success=no exit=-13 (...) comm="bash" exe="/usr/bin/bash" (...) SYSCALL=faccessat2

If I instead try to use touch /root/test as a non-privileged user, csysdig will correctly show an EACCES error caused by the openat syscall.

Is this a bug, or somehow expected/intended behavior?

The only real difference I see here is that [ or the equivalent test are built-ins of the shell.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 25, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
@therealbobo therealbobo reopened this Jun 4, 2024
@github-actions github-actions bot removed the stale label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants