Skip to content

seccomp SIGSYS exploit#37

Open
nataliakokoromyti wants to merge 2 commits intogpu-mode:masterfrom
nataliakokoromyti:exploit/seccomp-trap
Open

seccomp SIGSYS exploit#37
nataliakokoromyti wants to merge 2 commits intogpu-mode:masterfrom
nataliakokoromyti:exploit/seccomp-trap

Conversation

@nataliakokoromyti
Copy link
Contributor

Currently, we're blocking things like prctl and ptrace but the seccomp() syscall itself can also add a filter to rewrite timing data without getting caught.

harness tried to write timing data ---> kernel's SIGSYS signal ---> signal handler catches it ---> rewrites numbers ---> forwards modified data ---> harness thinks write() succeeded

Installs a BPF filter via the seccomp() syscall that traps write()
on the output pipe fd. A SIGSYS signal handler intercepts the
trapped write, rewrites timing data, and forwards via writev() to
a dup'd copy of the original fd.

The harness blocks prctl(SET_SECCOMP) but not the seccomp() syscall
itself (syscall 317), which is the actual entry point for installing
new BPF filters.
Refactor comments for clarity and update timing line processing.
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

Successfully merging this pull request may close these issues.

1 participant