#21372 closed defect (fixed)

Don't crash when we fail to find extend info for a middle node

Reported by: teor Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: crash-resistance
Cc: Actual Points:
Parent ID: Points: 0.2
Reviewer: Sponsor:

Description

In #21242, we eliminated a crash when we failed to find an extend info for a guard in onion_extend_cpath. But we left in an assert for the middle case. (We should also make sure the equivalent exit case is non-fatal.)

Child Tickets

Change History (7)

comment:1 Changed 10 months ago by nickm

Milestone: Tor: unspecifiedTor: 0.3.0.x-final

(Should this be 0.3.0?)

comment:2 Changed 10 months ago by nickm

Owner: set to nickm
Status: newaccepted

Fixed in branch bug21372 ; please review?

I found three cases where we would crash if extend_info_from_node() returned NULL.

comment:3 Changed 10 months ago by nickm

Status: acceptedneeds_review

comment:4 Changed 10 months ago by dgoulet

Status: needs_reviewneeds_revision

Changes file has bugfix on 0.3.1-alpha. which I think you might have meant 0.3.0.1-alpha?

I think there might be another assert possibility here in the case first_node is NULL ?

./src/or/control.c +3379   extend_info_t *info = extend_info_from_node(node, first_node);

comment:5 Changed 10 months ago by nickm

Status: needs_revisionneeds_review

Added a couple of fixups. Better now?

comment:6 Changed 10 months ago by dgoulet

Status: needs_reviewmerge_ready

Ack!

comment:7 Changed 10 months ago by nickm

Resolution: fixed
Status: merge_readyclosed
15:34 < dgoulet> nickm: good stuff!

So, merged!

Note: See TracTickets for help on using tickets.