Opened 2 years ago

Closed 12 days ago

#22619 closed defect (fixed)

SessionGroup = Reading config failed

Reported by: acceleraTor Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version: Tor: 0.2.7.2-alpha
Severity: Normal Keywords: SessionGroup configuration SocksPort option 032-unreached 035-backport 040-backport 041-can
Cc: mcs, brade Actual Points: 0
Parent ID: Points: 0
Reviewer: mikeperry Sponsor:

Description

If i specify SessionGroup as described in manual. tor stops with error.

torrc:

SocksPort 9051 SessionGroup=1

Jun 15 16:46:24.700 [warn] Invalid SocksPort option '"SessionGroup=INT"'

Jun 15 16:46:24.700 [warn] Failed to parse/validate config: Invalid SocksPort/SocksListenAddress configuration

Jun 15 16:46:24.701 [err] Reading config failed--see warnings above.

second try

SocksPort 9051 SessionGroup=INT

Results into:

Jun 15 16:46:35.677 [warn] Invalid SocksPort option '"SessionGroup=1"'

Jun 15 16:46:35.678 [warn] Failed to parse/validate config: Invalid SocksPort/SocksListenAddress configuration

Jun 15 16:46:35.677 [warn] Invalid SocksPort option '"SessionGroup=1"'

Jun 15 16:46:35.678 [warn] Failed to parse/validate config: Invalid SocksPort/SocksListenAddress configuration

Jun 15 16:46:35.678 [err] Reading config failed--see warnings above.

Child Tickets

TicketStatusOwnerSummaryComponent
#29121closedtor man page doesn't mention isolating between socksportsCore Tor/Tor

Change History (16)

comment:1 Changed 2 years ago by gk

Cc: mcs brade added
Component: - Select a componentApplications/Tor Browser
Milestone: Tor: 0.3.0.x-final
Status: newneeds_information
Version: Tor: 0.3.0.8

I assume you are using Tor Browser?

comment:2 Changed 2 years ago by gk

Component: Applications/Tor BrowserCore Tor/Tor

Okay, this happens as well with 6.5.2, so it does not seem #20761 related. Thus, moving this back to tor (I have not looked whether that is valid torrc stuff at all).

Last edited 2 years ago by gk (previous) (diff)

comment:3 Changed 2 years ago by acceleraTor

yes this happens in previous versions too.
SessionGroup valid options should be set from
SessionGroup=0
SessionGroup=1
SessionGroup=2
SessionGroup=3
SessionGroup=4
SessionGroup=5
SessionGroup=6
SessionGroup=7
SessionGroup=8
SessionGroup=9

as i understand config.c; if (!strcasecmpstart(elt, "SessionGroup=")) {

int group = (int)tor_parse_long(elt+strlen("SessionGroup="),

10, 0, INT_MAX, &ok, NULL);

if (!ok
!allow_no_stream_options) {

log_warn(LD_CONFIG, "Invalid %sPort option '%s'",

portname, escaped(elt));

goto err;

}
if (sessiongroup >= 0) {

log_warn(LD_CONFIG, "Multiple SessionGroup options on %sPort",

portname);

goto err;

}
sessiongroup = group;
continue;

}

reproduce by create torrc with content:
SocksPort 9150 SessionGroup=1
start tor --verify-config

comment:4 Changed 2 years ago by catalyst

Milestone: Tor: 0.3.1.x-final
Owner: set to catalyst
Status: needs_informationaccepted

Reproduced on master. It does seem that the !allow_no_stream_options test is backwards, but I'll need to stare at it a bit more.

comment:5 Changed 2 years ago by catalyst

Version: Tor: 0.2.7.2-alpha

comment:6 Changed 2 years ago by catalyst

Milestone: Tor: 0.3.1.x-finalTor: 0.3.2.x-final

comment:7 Changed 2 years ago by catalyst

Keywords: 032-unreached added
Milestone: Tor: 0.3.2.x-finalTor: unspecified

comment:8 Changed 3 months ago by cypherpunks

still makes trouble from tor v.2.x-v.4.x

SocksPort 9150 SessionGroup=1
Tor 0.3.5.8
[warn] Invalid SocksPort option '"SessionGroup=1"'

comment:9 Changed 3 months ago by nickm

Actual Points: 0
Owner: changed from catalyst to nickm

Thanks for the reminder! I'll give it a shot.

comment:10 Changed 3 months ago by nickm

Keywords: 035-backport 040-backport 041-can added
Milestone: Tor: unspecifiedTor: 0.4.1.x-final
Status: acceptedneeds_review

See branch bug22619_035 with PR as https://github.com/torproject/tor/pull/1065 .

comment:11 Changed 3 months ago by asn

Reviewer: mikeperry

comment:12 Changed 3 months ago by mikeperry

Status: needs_reviewmerge_ready

This looks fine; sorry for the delay.

comment:13 Changed 2 months ago by nickm

Keywords: asn-merge added

comment:14 Changed 2 months ago by asn

Keywords: asn-merge removed

Merged to 041 and forward. Leaving open for backports.

comment:15 Changed 2 months ago by nickm

Milestone: Tor: 0.4.1.x-finalTor: 0.4.0.x-final

comment:16 Changed 12 days ago by teor

Milestone: Tor: 0.4.0.x-finalTor: 0.3.5.x-final
Points: 0
Resolution: fixed
Status: merge_readyclosed

Backported to 0.3.5.
Merged with the other 0.3.5 and 0.4.0 backports on 2019-08-12.

Note: See TracTickets for help on using tickets.