Opened 2 months ago

Closed 2 months ago

#33668 closed defect (fixed)

--disable-module-relay yields to a Bug:

Reported by: toralf Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version: Tor: 0.4.3.3-alpha
Severity: Normal Keywords: crash 043-must
Cc: Actual Points: .1
Parent ID: #33674 Points:
Reviewer: teor Sponsor:

Description

At a hardened Gentoo Linux the configure option yields to a

# tor --verify-config 
Mar 19 19:44:35.839 [notice] Tor 0.4.3.3-alpha running on Linux with Libevent 2.1.8-stable, OpenSSL LibreSSL 3.0.2, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd N/A.
Mar 19 19:44:35.840 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Mar 19 19:44:35.840 [notice] This version is not a stable Tor release. Expect more bugs than usual.
Mar 19 19:44:35.840 [notice] Read configuration file "/etc/tor/torrc".
Mar 19 19:44:35.843 [err] tor_assertion_failed_(): Bug: src/app/config/config.c:1473: options_switch_id: Assertion have_low_ports != -1 failed; aborting. (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.844 [err] Bug: Tor 0.4.3.3-alpha: Assertion have_low_ports != -1 failed in options_switch_id at src/app/config/config.c:1473: . Stack trace: (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.845 [err] Bug:     tor(log_backtrace_impl+0x59) [0x5564677d3ab9] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.845 [err] Bug:     tor(tor_assertion_failed_+0x150) [0x5564677cecb0] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.845 [err] Bug:     tor(set_options+0x404) [0x5564677535d4] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.845 [err] Bug:     tor(+0x1648a0) [0x5564677548a0] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.845 [err] Bug:     tor(options_init_from_string+0x119) [0x556467754af9] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.845 [err] Bug:     tor(options_init_from_torrc+0x359) [0x5564677550f9] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.845 [err] Bug:     tor(tor_init+0x1c7) [0x55646764ade7] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.846 [err] Bug:     tor(tor_run_main+0x71) [0x55646764b4e1] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.846 [err] Bug:     tor(tor_main+0x46) [0x55646764a006] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.846 [err] Bug:     tor(main+0x19) [0x556467649bd9] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.846 [err] Bug:     /lib64/libc.so.6(__libc_start_main+0xeb) [0x7ff9817b8f1b] (on Tor 0.4.3.3-alpha )
Mar 19 19:44:35.846 [err] Bug:     tor(_start+0x2a) [0x556467649c2a] (on Tor 0.4.3.3-alpha )
Aborted

The same tarball at the same system works fine with that option being enabled.
The config is

cat /etc/tor/torrc
User tor
PIDFile /var/run/tor/tor.pid
Log notice file /tmp/notice.log
DataDirectory /var/lib/tor/data

CookieAuthentication 1
ControlPort 9051

SocksPort 9050

SandBox 1

Child Tickets

Change History (7)

comment:1 Changed 2 months ago by nickm

Keywords: crash 043-should added
Milestone: Tor: 0.4.3.x-final
Owner: set to nickm
Status: newaccepted

comment:2 Changed 2 months ago by nickm

Apparently the User option on its own is sufficient to cause this behavior.

comment:3 Changed 2 months ago by nickm

Actual Points: .1
Status: acceptedneeds_review

Simple fix in branch 33668_043 with PR at https://github.com/torproject/tor/pull/1817 .

"It works for me".

comment:4 Changed 2 months ago by teor

Keywords: 043-must added; 043-should removed
Reviewer: teor
Status: needs_reviewmerge_ready

Looks good to me, let's merge after appveyor CI passes?

comment:5 Changed 2 months ago by teor

I opened #33674 for follow-up, because we might have also made mistakes with other out and inout return values.

comment:6 Changed 2 months ago by teor

Parent ID: #33674

Hmm, actually, I found a duplicated (void)msg in the patch.

I fixed it, and did some more fixes in #33674. So let's squash my fix, and merge this ticket along with #33674?

comment:7 Changed 2 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged with parent.

Note: See TracTickets for help on using tickets.