Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658106 - net-vpn/tor on glibc-2.27 can't use sandboxing
Summary: net-vpn/tor on glibc-2.27 can't use sandboxing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-14 15:23 UTC by Doppler
Modified: 2018-08-25 13:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doppler 2018-06-14 15:23:44 UTC
After upgrading to glibc-2.27 and rebuilding @world, Tor crashes right after being started with a message like this:
============================================================ T= 1528983902                                                           
(Sandbox) Caught a bad syscall attempt (syscall openat)
tor(+0x1921da)[0x56009de401da]
/lib64/libpthread.so.0(open64+0x4b)[0x7f24bc48a1db]
/lib64/libpthread.so.0(open64+0x4b)[0x7f24bc48a1db]
tor(tor_open_cloexec+0x40)[0x56009de26a10]
tor(start_writing_to_file+0x16a)[0x56009de3a5aa]
tor(+0x18c68b)[0x56009de3a68b]
tor(+0x18c7d8)[0x56009de3a7d8]
tor(or_state_save+0x151)[0x56009dd666e1]
tor(+0x5099d)[0x56009dcfe99d]
tor(+0x6c0e1)[0x56009dd1a0e1]
tor(rescan_periodic_events+0x111)[0x56009dd01271]
/usr/lib64/libevent-2.1.so.6(+0x226bd)[0x7f24bd8966bd]
/usr/lib64/libevent-2.1.so.6(event_base_loop+0x4e7)[0x7f24bd897377]
tor(do_main_loop+0x17a)[0x56009dd028fa]
tor(tor_run_main+0x1015)[0x56009dd04ce5]
tor(tor_main+0x3a)[0x56009dcfd17a]
tor(main+0x19)[0x56009dcfcf09]
/lib64/libc.so.6(__libc_start_main+0xe7)[0x7f24bc0d09f7]
tor(_start+0x2a)[0x56009dcfcf5a]

It's triggered by having "Sandbox 1" in the torrc.
It's always worked perfectly before and rebuilding it doesn't help.
Comment 1 Doppler 2018-06-14 17:42:41 UTC
Oh, and emerge --info net-vpn/tor:

Portage 2.3.40 (python 3.6.5-final-0, targets/desktop, gcc-7.3.0, glibc-2.27-r4, 4.17.1-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.17.1-gentoo-x86_64-Intel-R-_Core-TM-_i7-4700MQ_CPU_@_2.40GHz-with-gentoo-2.6
KiB Mem:     8069676 total,    827196 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Thu, 14 Jun 2018 15:06:11 +0000
Head commit of repository gentoo: 1b2c10848029982f66fbc4e921d95066475cb65c

Head commit of repository esteid: 65f9cdbb2f418e2569f31a76d1dfaf3aaf0c285e

Timestamp of repository raiagent: Wed, 13 Jun 2018 08:55:05 +0000
Head commit of repository raiagent: acd8e9afd5474e1e24b0d34f96ab2ff329b9102f

Timestamp of repository ssnb: Wed, 13 Jun 2018 08:55:49 +0000
Head commit of repository ssnb: 3020e7e76a3da6e2eed3b48af7f2f7e37f1b8d54

Timestamp of repository steam-overlay: Wed, 13 Jun 2018 08:55:12 +0000
Head commit of repository steam-overlay: b40297909c5b30088bd90559f9422cf14b8fc3dd

Timestamp of repository weuxel: Wed, 13 Jun 2018 08:55:22 +0000
Head commit of repository weuxel: 5f90a8e84c31db39607dbf6589b463ee9007e6b1

sh bash 4.4_p23
ld GNU ld (Gentoo 2.30 p3) 2.30.0
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.5.5-r1::gentoo, 3.6.5-r1::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.11.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6::gentoo
sys-apps/openrc:          0.36::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r3::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo, 7.2.0-r1::gentoo, 7.3.0-r3::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000
    sync-git-verify-commit-signature: true

esteid
    location: /var/db/repos/esteid
    sync-type: git
    sync-uri: https://github.com/open-eid/gentoo.git
    masters: gentoo

raiagent
    location: /var/db/repos/raiagent
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/raiagent.git
    masters: gentoo

ssnb
    location: /var/db/repos/ssnb
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/ssnb.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

weuxel
    location: /var/db/repos/weuxel
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/weuxel.git
    masters: gentoo

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

local
    location: /usr/local/portage
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install preserve-libs protect-owned sandbox selinux sesandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://mirror.dkm.cz/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 --load-average=4.0"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 audit bluetooth branding bzip2 cairo caps cdda cdr cjk consolekit crypt curl cxx dbus dri dri3 dts dvd dvdr emboss encode exif fam ffmpeg flac gif glamor gpm gtk gtk3 hardened iconv icu ipv6 jit jpeg lcms ldap libass libnotify libtirpc lz4 lzma lzo mad matroska mng mp3 mp4 mpeg mtp multilib ncurses nls nptl offensive ogg open_perms opengl openmp pam pango pcre pdf peer_perms pgo pie png policykit ppds ptpax pulseaudio qt5 raw readline samba sdl seccomp selinux smartcard socks5 sound spell ssl ssp startup-notification svg threads tiff truetype udev udisks unconfined unicode upower usb v4l vaapi vorbis wayland webp wifi wxwidgets x264 xattr xcb xml xtpax xv xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse libinput evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU BPF NVPTX X86 AArch64 ARM" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 x86_64" QEMU_USER_TARGETS="aarch64 aarch64_be arm armeb i386 x86_64" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="i965 i915 intel radeon radeonsi v4l amdgpu vesa" XFCE_PLUGINS="brightness clock trash power" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-vpn/tor-0.3.4.2_alpha::gentoo was built with the following:
USE="lzma scrypt seccomp (selinux) tor-hardening zstd -libressl (-systemd) -test -web" ABI_X86="(64)"
Comment 2 tonemgub 2018-06-15 21:56:42 UTC
Confirming. Reported upstream: https://trac.torproject.org/projects/tor/ticket/26387
Comment 3 Doppler 2018-08-25 13:42:10 UTC
This appears to have been fixed as of net-vpn/tor-0.3.4.7_rc