Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18833 closed defect (duplicate)

Tor doesn't warn for socks5-not-hostname connections

Reported by: arma Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 029-proposed
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In parse_socks(), we do

          if (log_sockstype)
            log_notice(LD_APP,
                  "Your application (using socks5 to port %d) instructed "
                  "Tor to take care of the DNS resolution itself if "
                  "necessary. This is good.", req->port);

and

        if (log_sockstype)
          log_notice(LD_APP,
                     "Your application (using socks4a to port %d) instructed "
                     "Tor to take care of the DNS resolution itself if "
                     "necessary. This is good.", req->port);

But for the "you gave us socks5, the wrong kind" case, we call log_unsafe_socks_warning(), and it ends up not logging anything.

On first look, the issue is in log_unsafe_socks_warning(), where it says

  if (safe_socks) {

In commit a7334f5, we see

-  if (safe_socks || (m = rate_limit_log(&socks_ratelim, approx_time()))) {
-    log_warn(LD_APP,
+  if (safe_socks) {
+    log_fn_ratelim(&socks_ratelim, LOG_WARN, LD_APP,

That doesn't look right, does it?

(That commit got into 0.2.4.11-alpha it seems.)

Child Tickets

Change History (5)

comment:1 Changed 3 years ago by arma

Summary: "TestSocks 1" is silent for socks5-not-hostname connectionsTor doesn't warn for socks5-not-hostname connections

Actually, I think it's worse than the original title -- even with TestSocks at its default, Tor doesn't warn anything when we use a dangerous type of socks.

comment:2 Changed 3 years ago by cypherpunks

I think you just re-discovered #18213, arma. Congrats! :)

comment:3 Changed 3 years ago by arma

Resolution: duplicate
Status: newclosed

Closing as duplicate of #18213

comment:4 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:5 Changed 3 years ago by nickm

Milestone: Tor: 0.3.???

Milestone deleted

Note: See TracTickets for help on using tickets.