Opened 2 years ago

Closed 20 months ago

#23706 closed defect (fixed)

Tor's seccomp sandbox does not know about the syscall epoll_pwait

Reported by: cypherpunks Owned by:
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version: Tor: 0.3.2.1-alpha
Severity: Normal Keywords: seccomp, sandbox, musl, 029-backport, 031-backport
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I was playing with the seccomp sandbox with tor 3.2.1-alpha.

The system in question uses Musl as the standard C library. When adding "Sandbox 1" to a minimal torrc (attached at the end), this results in an error, saying "(Sandbox) Caught a bad syscall attempt (syscall epoll_pwait)".

The operating system is Gentoo, and the kernel version is 4.9.24-grsec. It is reproducible on Alpine Linux (which also uses Musl as standard C library), but not on Debian, which suggests this is due to Musl exposing an extra system call to Tor that the sandbox does not recognize.

It's also reproducible on tor-0.3.1.7, which suggests this is not a new defect for the 3.2.x series.

The minimal torrc for which this is reproducible is as follows:

User tor
Log debug file /var/log/tor/tor.log
DataDirectory /var/lib/tor/data
Sandbox 1

Child Tickets

Change History (5)

comment:1 Changed 2 years ago by cypherpunks

comment:2 Changed 2 years ago by nickm

Milestone: Tor: 0.3.3.x-final

musl-libc will probably have some more issues to tackle here; 0.3.3 seems like a plausible target

comment:3 Changed 21 months ago by ahf

I believe this was fixed in d2d6a1b082fa0eac8b6478889a0c28bf05e48073?

comment:4 Changed 21 months ago by nickm

Keywords: 029-backport 031-backport added
Milestone: Tor: 0.3.3.x-finalTor: 0.3.1.x-final
Status: newmerge_ready

Marking it as a backport candidate, maybe.

comment:5 Changed 20 months ago by nickm

Milestone: Tor: 0.3.1.x-finalTor: 0.2.9.x-final
Resolution: fixed
Status: merge_readyclosed

Backported along with #24315

Note: See TracTickets for help on using tickets.