Opened 4 months ago

Closed 4 months ago

#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 4 months ago by nickm

  • Milestone changed from Tor: unspecified to Tor: 0.3.0.x-final

(Should this be 0.3.0?)

comment:2 Changed 4 months ago by nickm

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

Fixed in branch bug21372 ; please review?

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

comment:3 Changed 4 months ago by nickm

  • Status changed from accepted to needs_review

comment:4 Changed 4 months ago by dgoulet

  • Status changed from needs_review to needs_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 4 months ago by nickm

  • Status changed from needs_revision to needs_review

Added a couple of fixups. Better now?

comment:6 Changed 4 months ago by dgoulet

  • Status changed from needs_review to merge_ready

Ack!

comment:7 Changed 4 months ago by nickm

  • Resolution set to fixed
  • Status changed from merge_ready to closed
15:34 < dgoulet> nickm: good stuff!

So, merged!

Note: See TracTickets for help on using tickets.