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

Fixes to seccomp event handling logic #266

Merged
merged 5 commits into from
Sep 7, 2021
Merged

Conversation

jzakrzew
Copy link
Contributor

  • Fix a bug in seccomp event handling logic, that could cause sysexit events handler to be missed if sysenter is handled during a syscall-enter-stop event instead of the seccomp ptrace event. A test case for this behavior is also added.
  • make kernel version detection work for major versions > 4.
  • indentation fixes
  • Remove some preprocessor directives and code that tie runtime behavior to compilation environment, which is the wrong thing to do.

This may be a (at least partial) fix for issue #106.

When running under seccomp, sometimes sysexit handlers fail to execute.
This is possible when the first syscall a process makes,
before seccomp is enabled, gets handled in the SIGTRAP path.
However the conditions for this to occur seem fairly random,
so we fork out many processes to make it likely that at least
some hit this problem.

This problem may be related to issue proot-me#106.
sysexit events handler to be missed if sysenter is handled during
a syscall-enter-stop event instead of the seccomp ptrace event.

This may be a (at least partial) fix for issue proot-me#106.
that tie runtime behavior to compilation environment,
which is the wrong thing to do.
@oxr463 oxr463 self-assigned this Aug 28, 2021
@oxr463 oxr463 modified the milestones: PRoot v5.2, PRoot Next Aug 29, 2021
@oxr463 oxr463 merged commit 252a824 into proot-me:master Sep 7, 2021
@oxr463 oxr463 linked an issue Sep 7, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install software via apt in proot environment
2 participants