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

The epoll_ctl operation not permitted #109

Open
archine opened this issue Aug 1, 2024 · 1 comment
Open

The epoll_ctl operation not permitted #109

archine opened this issue Aug 1, 2024 · 1 comment

Comments

@archine
Copy link

archine commented Aug 1, 2024

I've added SYS_EPOLL_CTL, but looking at the call log through strace will still appear.

image

  • all calls
"openat",
"futex",
"fcntl",
"clone",
"rt_sigprocmask",
"rt_sigreturn",
"rt_sigaction",
"mmap",
"readlinkat",
"read",
"write",
"tgkill",
"epoll_create1",
"epoll_ctl",
"pipe2",
"fstat",
"pread64",
"close",
"prctl",
"getpid",
"gettid",
"set_tid_address",
"rseq",
"newfstatat",
  • invoke
func Seccomp(allowedSysCalls []string) error {
	ctx, err := seccomp.NewFilter(seccomp.ActKillProcess)
	if err != nil {
		return err
	}
	for _, syscallID := range allowedSysCalls {
		call, err := seccomp.GetSyscallFromName(syscallID)
		if err != nil {
			return err
		}
		if err = ctx.AddRule(call, seccomp.ActAllow); err != nil {
			return err
		}
	}
	if err = ctx.Load(); err != nil {
		return err
	}
	return nil
}
  • go version go1.20.14 linux/amd64
  • libseccomp-golang: v0.10.0
  • os: 5.15.0-78-generic
@archine
Copy link
Author

archine commented Aug 1, 2024

the libseccomp version:

ii libseccomp-dev:amd64 2.5.3-2ubuntu2 amd64 high level interface to Linux seccomp filter (development files)
ii libseccomp2:amd64 2.5.3-2ubuntu2 amd64 high level interface to Linux seccomp filter

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

1 participant