Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4531 closed defect (fixed)

connection_tls_start_handshake(): inconstistency checks of conn->tls

Reported by: troll_un Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: easy tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Checking for NULL from tor_tls_new() happens too late:

  conn->tls = tor_tls_new(conn->_base.s, receiving);
  tor_tls_set_logged_address(conn->tls, // XXX client and relay?
      escaped_safe_str(conn->_base.address));
  if (!conn->tls) {

Before that condition tor_assert happens in the tor_tls_set_logged_address():

tor_tls_set_logged_address(tor_tls_t *tls, const char *address)
{
  tor_assert(tls);

Child Tickets

Change History (7)

comment:1 Changed 8 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:2 Changed 8 years ago by nickm

Resolution: fixed
Status: newclosed

Looks like I fixed that one in e27a26d5 but forgot a backport and a changes file. Doing those now.

comment:3 Changed 8 years ago by asn

Resolution: fixed
Status: closedreopened

This bug got re-introduced after #4662.

comment:4 Changed 8 years ago by asn

Status: reopenedneeds_review

See branch bug4513 in https://git.gitorious.org/mytor/mytor.git for a fix against master.

It seems to be backported to maint-0.2.2 in 6171bdd1056e3511b1842ac8a3e17aa349616075, and there is already a Changelog entry for it (not sure what to do about this)...

comment:5 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

merged and added a new changes file.

comment:6 Changed 7 years ago by nickm

Keywords: tor-client added

comment:7 Changed 7 years ago by nickm

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