Opened 4 weeks ago

Closed 4 weeks ago

Last modified 2 weeks ago

#31772 closed defect (fixed)

MAPADDRESS control command

Reported by: kowenki Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version: Tor: 0.4.1.5
Severity: Normal Keywords: 041-backport 041-regression? 042-must
Cc: Actual Points: .2
Parent ID: Points: .2
Reviewer: Sponsor: Sponsor31-can

Description

I'm using the control socket to execute MAPADDRESS commands.
Since TorBrowser 8.5.5 (Linux64) with Tor 0.4.1.5 the behavior changed.

On TorBrowser 8.5.4 (Linux64) with Tor 0.4.0.5 the following command worked:

MAPADDRESS *.torproject.org=127.0.0.1
250 *.torproject.org=127.0.0.1

On TorBrowser 8.5.5 (Linux64) with Tor 0.4.1.5 the following happens:

MAPADDRESS *.torproject.org=127.0.0.1
512 syntax error: not enough arguments to mapaddress.

However, I found out that the following works:

MAPADDRESS foo *.torproject.org=127.0.0.1
250 *.torproject.org=127.0.0.1

I could not find any information about a change in the MAPADDRESS command specification.

Did the MAPADDRESS command change or may this be a bug in the command parsing?

Child Tickets

Change History (7)

comment:1 Changed 4 weeks ago by nickm

Keywords: 041-backport 041-regression? 042-must added
Milestone: Tor: 0.4.2.x-final
Sponsor: Sponsor31-can

This looks like a parsing bug to me; I'll investigate. The likeliest cause is the controller refactoring in 0.4.1.x.

comment:2 Changed 4 weeks ago by nickm

Owner: set to nickm
Points: .2
Status: newaccepted

comment:3 Changed 4 weeks ago by nickm

Actual Points: .2

I have a potential fix in branch bug31772_041. I've made a PR at https://github.com/torproject/tor/pull/1336 . kowenki, does this work for you?

I've tested this by hand and it works well for me. I've also written a stem integration test that we can use here: see #25611. I have confirmed that my code passes this stem integration test, and that maint-0.4.1 does not pass without it.

comment:4 Changed 4 weeks ago by nickm

Status: acceptedneeds_review

CI has passed.

comment:5 Changed 4 weeks ago by teor

Status: needs_reviewmerge_ready

Seems like a trivial fix.
Let's merge to master, check CI is happy, then backport?

comment:6 Changed 4 weeks ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged to 0.4.1 and forward, with asn's approval.

kowenki, please reopen this ticket if the bug isn't fixed for you?

comment:7 Changed 2 weeks ago by teor

Milestone: Tor: 0.4.2.x-finalTor: 0.4.1.x-final
Note: See TracTickets for help on using tickets.