Opened 2 months ago

Closed 8 weeks ago

#32063 closed defect (fixed)

CID 1454769: Resource leaks in build_establish_intro_dos_extension()

Reported by: teor Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.4.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs, memleak,
Cc: asn Actual Points: 0.1
Parent ID: Points: 0.1
Reviewer: teor Sponsor: Sponsor27-must

Description

Caused by #31682, which was a fix to another coverity issue.

CID 1454769:  Resource leaks  (RESOURCE_LEAK)
/src/feature/hs/hs_cell.c: 533 in build_establish_intro_dos_extension()
527                                       TRUNNEL_DOS_PARAM_TYPE_INTRO2_BURST_PER_SEC,
528                                       service_config->intro_dos_burst_per_sec);
529     
530       /* Set the field with the encoded DoS extension. */
531       ret = trn_cell_extension_dos_encoded_len(dos_ext);
532       if (BUG(ret <= 0)) {
   CID 1454769:  Resource leaks  (RESOURCE_LEAK)
   Variable "field" going out of scope leaks the storage it points to.
533         return -1;
534       })

Child Tickets

Change History (2)

comment:1 Changed 2 months ago by dgoulet

Actual Points: 0.1
Keywords: tor-hs memleak added
Points: 0.1
Reviewer: teor
Sponsor: Sponsor27-must
Status: assignedneeds_review

PR: https://github.com/torproject/tor/pull/1407
Branch: ticket32063_042_01

comment:2 Changed 8 weeks ago by teor

Resolution: fixed
Status: needs_reviewclosed

Looks good, merged to 0.4.2 and later.

Note: See TracTickets for help on using tickets.