Opened 9 months ago

Closed 9 months ago

#21471 closed defect (fixed)

handle_get_hs_descriptor_v3() does strlen(NULL) when descriptor isn't found

Reported by: teor Owned by: dgoulet
Priority: Very High Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs, prop224, crash
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor: SponsorR-must

Description

hs_cache_lookup_as_dir() returns 0 when a descriptor isn't found, but a 404 is only sent when the return value is < 0.

Did anyone run this code?

Child Tickets

Change History (3)

comment:1 Changed 9 months ago by dgoulet

Owner: set to dgoulet
Priority: MediumVery High
Sponsor: SponsorR-must
Status: newaccepted

We are missing unit tests here for the 404 case... Quite bad so I'll submit this as well with the fix.

comment:2 Changed 9 months ago by dgoulet

Status: acceptedneeds_review

Fix and unit test in: bug21471_030_01

comment:3 Changed 9 months ago by nickm

Resolution: fixed
Status: needs_reviewclosed

merged!

Note: See TracTickets for help on using tickets.