Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #33788
Closed (moved) (moved)
Open
Created Apr 01, 2020 by teor@teor

Check the return value of tor_inet_ntop() and tor_inet_ntoa()

The following functions don't check the return value of tor_inet_ntop() or tor_inet_ntoa():

IPv6, could be serious:

  • evdns_callback(), multiple times

IPv4 only, unlikely to be a serious bug:

  • tor_dup_ip()
  • fmt_addr32()
  • evdns_wildcard_check_callback()

These functions should log a bug log using BUG() or tor_assert_nonfatal(), and return an error. (Or for the formatting functions, a sensible placeholder string.)

We will also need to make their callers check for the error.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking