Opened 5 months ago

Closed 2 months ago

#21293 closed defect (fixed)

circuit_receive_relay_cell(): Bug: relay crypt failed. Dropping connection.

Reported by: s7r Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor Version: Tor: 0.3.0.1-alpha
Severity: Normal Keywords: tor-client
Cc: Actual Points:
Parent ID: Points: .5
Reviewer: Sponsor:

Description

I've hit this today on a machine running Debian Jessie and Tor 0.3.0.1-alpha-dev (git-1a45398ffa713ca3+5156f73) acting as an onion service client with a SocksPort open and used as well. Functionality appears not to be affected, everything continues to run normally.

Besides the incoming rendezvous traffic, this instance also sends outgoing traffic via the SocksPort but to .onion destinations only, so it's mostly rendezvous traffic.

Jan 23 15:31:44.000 [warn] circuit_receive_relay_cell(): Bug: relay crypt failed. Dropping connection. (on Tor 0.3.0.1-alpha-dev )

Child Tickets

Change History (8)

comment:1 Changed 5 months ago by arma

There are failure cases of relay_crypt() that indicate bugs:

  • whenever relay_crypt_one_payload() fails

And there are failure cases of relay_crypt() that indicate that somebody out there on the Internet isn't behaving as expected:

      if (thishop->state != CPATH_STATE_OPEN) {
        log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
               "Relay cell before first created cell? Closing.");
        return -1;
      }

which I can trigger by sending a relay data cell in response to a relay extend request

and

      log_fn(LOG_PROTOCOL_WARN, LD_OR,
             "Incoming cell at client not recognized. Closing.");
      return -1;

which I can trigger by sending a relay data cell with a non-zero 'recognized' field.

I guess there is the question here of whether we should let the user know that something weird is going on, but I think the right answer is probably to change the outer warn from "bug warn omg" to log_protocol_warn and move on with our lives.

comment:2 follow-up: Changed 5 months ago by arma

Once we do that, we could close #8397 too if we like.

comment:3 in reply to: ↑ 2 Changed 5 months ago by arma

Replying to arma:

Once we do that, we could close #8397 too if we like.

(Oh, we already did. Great.)

comment:4 Changed 4 months ago by nickm

  • Points set to .5

comment:5 Changed 4 months ago by dgoulet

  • Keywords tor-hs removed

comment:6 Changed 3 months ago by dgoulet

  • Owner set to dgoulet
  • Status changed from new to accepted

comment:7 Changed 2 months ago by dgoulet

  • Status changed from accepted to needs_review

I downgraded the log statement from BUG to PROTOCOL_WARN.

See branch bug21293_031_01.

comment:8 Changed 2 months ago by nickm

  • Resolution set to fixed
  • Status changed from needs_review to closed

lgtm; merged

Note: See TracTickets for help on using tickets.