16:06:35 [NYX_NOTICE] BUG: Unexpected exception from ConnectionTracker: 'getpwnam(): name not found: tor-instance1' [999 duplicates hidden]
15:53:43 [WARN] Bug: /usr/bin/tor(+0x55ec4) [0x4e2ec4] (on Tor 0.3.5.8 )
15:53:43 [WARN] Bug: /usr/bin/tor(connection_handle_read+0x960) [0x4dc564] (on Tor 0.3.5.8 )
15:53:43 [WARN] Bug: /usr/bin/tor(+0x8c554) [0x519554] (on Tor 0.3.5.8 )
15:53:43 [WARN] Bug: /usr/bin/tor(channel_tls_handle_cell+0x4a8) [0x4f1b1c] (on Tor 0.3.5.8 )
15:53:43 [WARN] Bug: /usr/bin/tor(tor_bug_occurred_+0xb4) [0x687a78] (on Tor 0.3.5.8 )
15:53:43 [WARN] Bug: /usr/bin/tor(log_backtrace_impl+0x4c) [0x68c8c4] (on Tor 0.3.5.8 )
15:53:43 [WARN] Bug: Line unexpectedly reached at channel_tls_handle_cell at ../src/core/or/channeltls.c:1111. Stack trace: (on Tor 0.3.5.8)
15:53:43 [WARN] tor_bug_occurred(): Bug: ../src/core/or/channeltls.c:1111: channel_tls_handle_cell: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.3.5.8 )
Okay, this is a bug, and an old one. It looks like our logic in connection_or_process_cells_from_inbuf() is wrong in the way that it handles variable-length cells.
Basically, what it is doing right now it this:
try to fetch var_cell_t from buffer.if (we got a var_cell_t) { give it to the channel layer. return}see whether we have more than 512/514 bytes on the bufferif (we do) { package it as a cell_t give it to the channel layer return;}wait for more data
See the problem? If we have a pending incomplete variable-length cell of more than 512/514 bytes, it will get mis-packaged as a regular fixed-length cell.
What fun!
Trac: Priority: Very High to High Keywords: tor-channel security 042-must deleted, tor-channel 042-must 029-backport? 035-backport 040-backport 041-backport BugSmashFund added
The problem is that cell_command_is_var_length() looks at the link protocol version when deciding whether a cell is variable-length. That's cool, but it does mean that CELL_VERSIONS is not necessarily a variable-length cell. So if somebody sends a VERSIONS cell on a v1 connection, we'll hit this warning.
The right solution here is to make this tor_fragile_assert() into a protocol warning, since it happens when somebody else is violating the protocol. It is not a security issue or a crash after all. (Hooray!)