Opened 10 years ago

Last modified 7 years ago

#1016 closed defect (Fixed)

Bug warning reported on Control bad AUTH & QUIT

Reported by: neoeinstein Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version: 0.2.1.15-rc
Severity: Keywords:
Cc: neoeinstein Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

If a QUIT command is issued to the control port immediately after
a bad AUTHENTICATE command, a Bug warning is logged:

Jun 23 23:19:02.647 [warn] Bug: Duplicate call to connection_mark_for_close at control.c:2894 (first at control.c:1096)

To reproduce:
"""
cat <<EOF | nc localhost 9051
AUTHENTICATE totally-malformed
QUIT
EOF
"""

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (4)

comment:1 Changed 10 years ago by neoeinstein

Patch that fixes this:

"""
diff --git a/src/or/control.c b/src/or/control.c
index 0a173a7..662da98 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2780,7 +2780,12 @@ connection_control_process_inbuf(control_connection_t *conn)

--data_len;

}

  • /* Quit is always valid. */

+ /* If the connection is already closing, ignore further commands */
+ if (TO_CONN(conn)->marked_for_close) {
+ return 0;
+ }
+
+ /* Otherwise, Quit is always valid. */

if (!strcasecmp(conn->incoming_cmd, "QUIT")) {

connection_write_str_to_buf("250 closing connection\r\n", conn);
connection_mark_for_close(TO_CONN(conn));

"""

comment:2 Changed 10 years ago by nickm

Fixed in d3087389196b585ab4e0b5ee64fc36b16f071eef

comment:3 Changed 10 years ago by nickm

flyspray2trac: bug closed.

comment:4 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.