Opened 3 weeks ago

Last modified 3 weeks ago

#31024 needs_review defect

Coverity: circpadding: always check circpad_machine_current_state()

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 041-should coverity
Cc: mikeperry, asn Actual Points:
Parent ID: Points:
Reviewer: mikeperry Sponsor:

Description

We usually check circpad_machine_current_state()'s return value, but in 2 places we don't. Coverity thinks that we're messing up in those cases.

This is CID 1447297 [circpad_estimate_circ_rtt_on_received] and 1447291 [circpad_is_token_removal_supported].

I suggest that we change our code to test the pointer in those cases. If we're sure that it can't be NULL, we can is an if (BUG(...)) check.

Child Tickets

Change History (2)

comment:1 Changed 3 weeks ago by asn

Status: newneeds_review

Please check the last commit of https://github.com/torproject/tor/pull/1160 which fixes both #31027 and #31024.

comment:2 Changed 3 weeks ago by asn

Reviewer: mikeperry
Note: See TracTickets for help on using tickets.