Summary: | net-proxy/tsocks segfaults if /etc/tsocks/tsocks.conf does not exist | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Longpoke <longpoke> |
Component: | Current packages | Assignee: | Andrew Savchenko <bircoph> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bircoph, mjo |
Priority: | Normal | Keywords: | NeedPatch |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Longpoke
2011-10-13 01:22:56 UTC
forgot version: net-proxy/tsocks-1.8_beta5-r5:0 also, tordns useflag is set Confirmed: $ TSOCKS_CONFFILE="~/aint-here.conf" tsocks true 21:29:35 (15133): Could not open socks configuration file (/etc/socks/tsocks.conf), assuming all networks local Segmentation fault If we touch the default conf file, $ sudo touch /etc/socks/tsocks.conf the warning goes away but the segfault stays: $ TSOCKS_CONFFILE="~/aint-here.conf" tsocks true Segmentation fault Have you tried talking upstream? We could just install tsocks.conf.simple.example or indeed an empty file, but it also looks like it segfaults /after/ that, not because of it, so I would assume that instead, it segfaults because a certain runtime configuration variable is not set. Strage, tsocks segfault without config file is not reproducible on all setups, only on some of them... (In reply to Andrew Savchenko from comment #5) > Strage, tsocks segfault without config file is not reproducible on all > setups, only on some of them... Oh, this happens only with USE="-tordns". (In reply to Andrew Savchenko from comment #6) > (In reply to Andrew Savchenko from comment #5) > > Strage, tsocks segfault without config file is not reproducible on all > > setups, only on some of them... > > Oh, this happens only with USE="-tordns". And even in this case it works here: libtsocks(32341): Could not open socks configuration file (/etc/socks/tsocks.conf), assuming all networks local Yup, this is tordns patch flow: it requires server data to setup pool early (at _init stage): Program terminated with signal SIGSEGV, Segmentation fault. #0 0xb69c43c8 in inet_aton () from /lib/libc.so.6 (gdb) bt #0 0xb69c43c8 in inet_aton () from /lib/libc.so.6 #1 0xb7760339 in init_pool (pool_size=pool_size@entry=256, deadrange_base=..., deadrange_mask=..., sockshost=0x0, socksport=0) at dead_pool.c:84 #2 0xb775d763 in deadpool_init () at tsocks.c:1309 #3 _init () at tsocks.c:165 #4 0xb77c30b2 in call_init.part () from /lib/ld-linux.so.2 #5 0xb77c31e2 in _dl_init_internal () from /lib/ld-linux.so.2 #6 0xb77b501f in _dl_start_user () from /lib/ld-linux.so.2 The only thing I can do here is to bail out before init_pool call if serever data is wrong. Though with torsocks in tree does anyone needs this patch anyway? Fix is ready, will be in -r7 (other changes are pending revbump now). Fixed in tsocks-1.8_beta5-r7. Now if SOCKS server is not properly configured, tordns is being disabled with the following message: 20:04:37 (2319): Could not open socks configuration file (/etc/socks tsocks.conf), assuming all networks local 20:04:37 (2319): SOCKS server or port is not provided, edit your config file to fix 20:04:37 (2319): failed to initialize deadpool: tordns disabled |