Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2750 closed defect (fixed)

Trivially incorrect warning in rend_parse_v2_service_descriptor

Reported by: special Owned by: rransom
Priority: Very Low Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-hs
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The warning displayed when a rendezvous descriptor exceeds REND_DESC_MAX_SIZE bytes incorrectly refers to that limit as "kilobytes". This check is also done after other calculations that serve no purpose if the descriptor exceeds this limit.

Patch forthcoming.

Child Tickets

Change History (10)

comment:1 Changed 8 years ago by special

Status: newneeds_review

comment:2 Changed 8 years ago by Sebastian

Milestone: Tor: 0.2.1.x-finalTor: 0.2.2.x-final

Thanks for the patch, looks good to me. But it also looks minor enough that we should put this into 0.2.2.x

comment:3 Changed 8 years ago by rransom

Owner: changed from special to rransom
Status: needs_reviewassigned

2011-03-13 23:45 <hsdir> last one. rend_parse_v2_service_descriptor() by design allows several descs in the string. REND_DESC_MAX_SIZE limiting all of them not one.
2011-03-13 23:47 <hsdir> what for parser wait for "\nrendezvous-service-descriptor " if 20kb is limit for string.

comment:4 Changed 8 years ago by rransom

So we should fix the log message on 0.2.1.x (mainly because it is too trivial to break anything, and we shouldn't lie to users if we can help it), but not move the length check yet.

comment:5 Changed 8 years ago by nickm

The right length check is I believe supposed to be for a single descriptor, which would indeed make it "if (eos-desc > REND_DESC_MAX_SIZE)" rather than "if (strlen(desc) > REND_DESC_MAX_SIZE)".

comment:6 Changed 8 years ago by rransom

Status: assignedneeds_review

See bug2750-v3 ( ssh://mob@repo.or.cz/srv/git/tor/rransom.git bug2750-v3 ) for a patch for the log message (for maint-0.2.1).

comment:7 in reply to:  3 Changed 8 years ago by rransom

Replying to rransom:

2011-03-13 23:45 <hsdir> last one. rend_parse_v2_service_descriptor() by design allows several descs in the string. REND_DESC_MAX_SIZE limiting all of them not one.
2011-03-13 23:47 <hsdir> what for parser wait for "\nrendezvous-service-descriptor " if 20kb is limit for string.

Moved to #2948.

comment:8 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks good; merged to 0.2.1. and later.

comment:9 Changed 7 years ago by nickm

Keywords: tor-hs added

comment:10 Changed 7 years ago by nickm

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