Opened 17 months ago

Last modified 14 months ago

#24735 needs_revision defect

Always check for the null address when calling address functions

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: ipv6, tor-relay, 034-triage-20180328, 034-removed-20180328
Cc: Actual Points:
Parent ID: #24403 Points: 1
Reviewer: Sponsor: SponsorV-can

Description

These address functions have never had return values:

  • node_get_prim_dirport()
  • node_get_pref_ipv6_orport()

We should make sure we always check for the null address when we call them.

Child Tickets

Change History (7)

comment:1 Changed 16 months ago by teor

Milestone: Tor: 0.3.3.x-finalTor: 0.3.4.x-final

The 0.3.3 freeze deadline has passed, all these children of #24403 belong in 0.3.4

comment:2 Changed 15 months ago by meryemz

Here is my patch for this ticket:
https://github.com/mary-em/torprojet-tor/tree/t-24735

And I think it is necessary as well for other address functions to check for the null address when calling them such as:

node_get_prim_orport()
node_get_pref_dirport()

comment:3 Changed 15 months ago by teor

It is necessary for all address functions to do this check. We recently made the change in master in tickets #23873 and #23874.

comment:4 Changed 15 months ago by teor

Status: newneeds_revision

Would you like to make those changes as well?

Also, here is a quick review of your branch:

Don't add an extra space before the fascist_firewall call.
Don't add chutney as a submodule.

There are no IPv6 DirPorts. Please replace the entire pref_dirport function with a call to prim_dirport.

Try to only call each function once in pref_orport. It makes for clearer logic.

comment:5 Changed 14 months ago by nickm

Keywords: 034-triage-20180328 added

comment:6 Changed 14 months ago by nickm

Keywords: 034-removed-20180328 added

Per our triage process, these tickets are pending removal from 0.3.4.

comment:7 Changed 14 months ago by nickm

Milestone: Tor: 0.3.4.x-finalTor: unspecified

These needs_revision, tickets, tagged with 034-removed-*, are no longer in-scope for 0.3.4. We can reconsider any of them, if somebody does the necessary revision.

Note: See TracTickets for help on using tickets.