Opened 10 years ago

Last modified 8 years ago

#1255 closed defect (Fixed)

correct NULL check on desc in rend_encode_v2_descriptors

Reported by: ekir Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: ekir, Sebastian Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


desc is dereferenced with desc->pk, and then checked for NULL.


crypto_pk_env_t *service_key = auth_type == REND_STEALTH_AUTH ?

client_key : desc->pk;

if (auth_type == REND_STEALTH_AUTH) {

descriptor_cookie = smartlist_get(client_cookies, 0);

if (!desc) {

log_warn(LD_REND, "Could not encode v2 descriptor: No desc given.");
return -1;


[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (4)

comment:1 Changed 10 years ago by Sebastian

Nice catch. I think we should assert here, but I'm checking with karsten before I
put up that patch.

comment:2 Changed 10 years ago by Sebastian

After talking to karsten, we decided that warning with LD_BUG is a good idea here.
Branch bug1255 in my repo.

comment:3 Changed 10 years ago by Sebastian

flyspray2trac: bug closed.

comment:4 Changed 8 years ago by nickm

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