[tor-bugs] #27620 [Core Tor/Tor]: Use trunnel to parse and generate SOCKS wire format in tor-resolve

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Dec 2 14:07:17 UTC 2018


#27620: Use trunnel to parse and generate SOCKS wire format in tor-resolve
-------------------------------------------------+-------------------------
 Reporter:  rl1987                               |          Owner:  rl1987
     Type:  enhancement                          |         Status:
                                                 |  merge_ready
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.0.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  unspecified
 Severity:  Normal                               |     Resolution:
 Keywords:  trunnel wireformat socks tor-        |  Actual Points:
  resolve security                               |
Parent ID:                                       |         Points:
 Reviewer:  dgoulet                              |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by nickm):

 Replying to [comment:12 nickm]:
 > Made a squashed & rebased version as
 https://github.com/torproject/tor/pull/556 .
 >
 > So far the only suggestions I have are:
 >
 >   * We should be using strlcpy, not strncpy.

 Though actually, tor_strdup() would be fine here, since the trunnel
 "getstr" functions return nul-terminated strings.

 >   * If we allow socks4_server_reply_version to be zero, then we'll need
 to explicitly set it to 4 in proto_socks.c so that we're sending the right
 value from Tor, right?

 Oh. apparently we don't do that.  That's okay.

 >   * Do we have a ticket for adding tests for tor-resolve?

 Yes, #27854, a child of this ticket.

 > I'll make all the above changes before merging, if the CI passes.

 Done, merged.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27620#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list