Skip to content
GitLab
  • Explore
  • Sign in
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #32363

tor_inet_aton parsing of IPv4 literals is too lax

The function tor_inet_aton accepts strings that include leading zeroes.

For example, "010.010.010.010" is parsed as "10.10.10.10".

This could potentially be a problem because "010.010.010.010" is obsolete notation for an octal IP address.

At least in glibc, inet_aton or getaddrinfo treats "010.010.010.010" as "8.8.8.8", whereas inet_ntop rejects it as invalid.

Trac:
Username: liberat

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