Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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