#30308 closed defect (fixed)

Use tor_mem_is_zero to check for broken node identity in node_is_a_configured_bridge()

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-performance tor-hs path-selection refactoring tor-dos asn-merge
Cc: Actual Points: .1
Parent ID: #30291 Points:
Reviewer: ahf Sponsor: Sponsor27-can


In node_is_a_configured_bridge(), we use BUG(tor_digest_is_zero(...)) to check for a broken node_t whose digest is not set. But that's overkill: tor_digest_is_zero() uses the slow constant-time tor_memeq(), and this is a case where we will hit a BUG().

Child Tickets

Change History (8)

comment:1 Changed 16 months ago by nickm

Status: assignedneeds_review

See branch ticket30307_30308 for a fix here. I'm calling this "no backport" since it's a performance issue only.

comment:3 Changed 16 months ago by nickm

Actual Points: .1

comment:4 Changed 16 months ago by dgoulet

Reviewer: ahf

comment:5 Changed 16 months ago by ahf

Status: needs_reviewmerge_ready

Looks good. I couldn't come up with additional cases to check for with the new case, but it seems like a smart idea to have the fallback mechanism to the old implementation.

comment:6 Changed 16 months ago by dgoulet

Keywords: dgoulet-merge added

comment:7 Changed 16 months ago by dgoulet

Keywords: asn-merge added; dgoulet-merge removed

Actually, I can't merge this... I've reviewed #30307.

comment:8 Changed 16 months ago by asn

Resolution: fixed
Status: merge_readyclosed


Note: See TracTickets for help on using tickets.