#32376 closed defect (fixed)

test: Possible NULL deref in free_fake_orcirc()

Reported by: dgoulet Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-test, coverity
Cc: Actual Points: 0.1
Parent ID: Points: 0.1
Reviewer: Sponsor:


Introduced with #32196.

Found by coverity:

*** CID 1455207:  Null pointer dereferences  (FORWARD_NULL)
/src/test/test_relay.c: 116 in test_relay_close_circuit()
110       if (orcirc) {
111         circuitmux_detach_circuit(nchan->cmux, TO_CIRCUIT(orcirc));
112         circuitmux_detach_circuit(pchan->cmux, TO_CIRCUIT(orcirc));
113         cell_queue_clear(&orcirc->base_.n_chan_cells);
114         cell_queue_clear(&orcirc->p_chan_cells);
115       }
>>>     CID 1455207:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "orcirc" to "free_fake_orcirc", which dereferences it.
116       free_fake_orcirc(orcirc);

Child Tickets

Change History (2)

comment:1 Changed 13 months ago by dgoulet

Actual Points: 0.1
Status: assignedneeds_review

Branch: ticket32376_043_01
PR: https://github.com/torproject/tor/pull/1497

comment:2 Changed 13 months ago by nickm

Resolution: fixed
Status: needs_reviewclosed

LGTM; merged!

Note: See TracTickets for help on using tickets.