library/std/src/net/parser.rs in Rust before 1.53.0 does not properly consider extraneous zero characters at the beginning of an IP address string, which (in some situations) allows attackers to bypass access control that is based on IP addresses, because of unexpected octal interpretation. References: https://github.com/rust-lang/rust/issues/83648 https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-015.md Upstream patch: https://github.com/rust-lang/rust/pull/83652
Flaw summary: Rust standard library's IpV4Addr would interpret leading zeroes like 0127.0.0.1 as the address 127.0.0.1. However, some applications may expect this same literal to be interpreted as 87.0.0.1 due to the original IPv4 specification allowing octal numbers. The upstream patch simply rejects octal numbers rather than parsing them as decimal.
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2021:4270 https://access.redhat.com/errata/RHSA-2021:4270