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

[Tor Gitlab #40020 - maint-0.3.5]: Fix seccomp sandbox rules for opening directories #2013

Open
wants to merge 3 commits into
base: maint-0.3.5
Choose a base branch
from

Commits on Jul 20, 2020

  1. Fix seccomp sandbox rules for openat #27315

    The need for casting negative syscall arguments depends on the
    glibc version. This affects the rules for the openat syscall which
    uses the constant AT_FDCWD that is defined as a negative number.
    This commit adds logic to only apply the cast when necessary, on
    glibc versions from 2.27 onwards.
    Jigsaw52 committed Jul 20, 2020
    Configuration menu
    Copy the full SHA
    c79b439 View commit details
    Browse the repository at this point in the history
  2. Fix seccomp sandbox rules for opening directories #40020

    Different versions of glibc use either open or openat for the
    opendir function. This commit adds logic to use the correct rule
    for each glibc version, namely:
    - Until 2.14 open is used
    - From 2.15 to to 2.21 openat is used
    - From 2.22 to 2.26 open is used
    - From 2.27 onwards openat is used
    Jigsaw52 committed Jul 20, 2020
    Configuration menu
    Copy the full SHA
    d28bfb2 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2020

  1. Fix startup crash with seccomp sandbox enabled #40072

    Fix crash introduced in #40020. On startup, tor calls
    check_private_dir on the data and key directories. This function
    uses open instead of opendir on the received directory. Data and
    key directoryes are only opened here, so the seccomp rule added
    should be for open instead of opendir, despite the fact that they
    are directories.
    Jigsaw52 committed Jul 28, 2020
    Configuration menu
    Copy the full SHA
    eab8e7a View commit details
    Browse the repository at this point in the history