{"id":"UBUNTU-CVE-2021-29922","details":"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.","modified":"2026-04-22T12:51:38.940699Z","published":"2021-08-07T17:15:00Z","upstream":["CVE-2021-29922"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-29922"},{"type":"REPORT","url":"https://github.com/rust-lang/rust/issues/83648"},{"type":"REPORT","url":"https://github.com/rust-lang/rust/pull/83652"},{"type":"REPORT","url":"https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-015.md"},{"type":"REPORT","url":"https://doc.rust-lang.org/beta/std/net/struct.Ipv4Addr.html"},{"type":"REPORT","url":"https://defcon.org/html/defcon-29/dc-29-speakers.html#kaoudis"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-29922"}],"affected":[{"package":{"name":"rustc","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/rustc@1.31.0+dfsg1+llvm-2ubuntu1~14.04.1ubuntu1?arch=source&distro=trusty/esm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.15.1+dfsg0-1~exp1ubuntu2~14.04.7","1.17.0+dfsg2-8~ubuntu0.14.04.3","1.21.0+dfsg1+llvm-0ubuntu3~14.04.5","1.22.1+dfsg1+llvm-0ubuntu2~14.04.2","1.24.1+dfsg1+llvm-0ubuntu1~14.04.1","1.25.0+dfsg1+llvm-0ubuntu1~14.04.1","1.28.0+dfsg1+llvm-0ubuntu1~14.04.1","1.30.0+dfsg1+llvm-2ubuntu1~14.04.1","1.31.0+dfsg1+llvm-2ubuntu1~14.04.1","1.31.0+dfsg1+llvm-2ubuntu1~14.04.1ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_name":"libstd-rust-1.31","binary_version":"1.31.0+dfsg1+llvm-2ubuntu1~14.04.1ubuntu1"},{"binary_name":"rust-gdb","binary_version":"1.31.0+dfsg1+llvm-2ubuntu1~14.04.1ubuntu1"},{"binary_name":"rust-lldb","binary_version":"1.31.0+dfsg1+llvm-2ubuntu1~14.04.1ubuntu1"},{"binary_name":"rust-src","binary_version":"1.31.0+dfsg1+llvm-2ubuntu1~14.04.1ubuntu1"},{"binary_name":"rustc","binary_version":"1.31.0+dfsg1+llvm-2ubuntu1~14.04.1ubuntu1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-29922.json"}},{"package":{"name":"rustc","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/rustc@1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2?arch=source&distro=esm-infra/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.0+dfsg1-1","1.15.1+dfsg0-1~exp1ubuntu2~16.04.3","1.17.0+dfsg2-8~ubuntu0.16.04.2","1.21.0+dfsg1+llvm-0ubuntu3~16.04.1","1.22.1+dfsg1+llvm-0ubuntu2~16.04.2","1.24.1+dfsg1+llvm-0ubuntu1~16.04.1","1.25.0+dfsg1+llvm-0ubuntu1~16.04.1","1.28.0+dfsg1+llvm-0ubuntu1~16.04.1","1.30.0+dfsg1+llvm-2ubuntu1~16.04.1","1.31.0+dfsg1+llvm-2ubuntu1~16.04.1","1.32.0+dfsg1+llvm-1ubuntu1~16.04.1","1.34.1+dfsg2+llvm-0ubuntu1~16.04.1","1.35.0+dfsg0.1+llvm-0ubuntu1~16.04.1","1.36.0+dfsg1+llvm-2ubuntu1~16.04.1","1.37.0+dfsg1+llvm-1ubuntu1~16.04.1","1.39.0+dfsg1+llvm-3ubuntu1~16.04.1","1.41.0+dfsg1+llvm-0ubuntu1~16.04.1","1.43.0+dfsg1+llvm-1~exp1ubuntu2~16.04.1","1.47.0+dfsg1+llvm-1ubuntu1~16.04.1","1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2"],"ecosystem_specific":{"binaries":[{"binary_name":"libstd-rust-1.47","binary_version":"1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2"},{"binary_name":"rust-gdb","binary_version":"1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2"},{"binary_name":"rust-lldb","binary_version":"1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2"},{"binary_name":"rust-src","binary_version":"1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2"},{"binary_name":"rustc","binary_version":"1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-29922.json"}},{"package":{"name":"rustc","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/rustc@1.53.0+dfsg1+llvm-4ubuntu1~20.04.1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1"}]}],"versions":["1.37.0+dfsg1+llvm-1ubuntu1","1.38.0+dfsg0.2+llvm-0ubuntu1","1.38.0+dfsg0.2+llvm-0ubuntu2","1.39.0+dfsg1+llvm-3ubuntu1","1.40.0+dfsg1+llvm-5ubuntu1","1.41.0+dfsg1+llvm-0ubuntu1","1.41.0+dfsg1+llvm-0ubuntu2","1.43.0+dfsg1+llvm-1~exp1ubuntu1~20.04.1","1.47.0+dfsg1+llvm-1ubuntu1~20.04.1","1.51.0+dfsg1+llvm-1~exp3ubuntu1~20.04.2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libstd-rust-1.53","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1"},{"binary_name":"rust-all","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1"},{"binary_name":"rust-clippy","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1"},{"binary_name":"rust-gdb","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1"},{"binary_name":"rust-lldb","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1"},{"binary_name":"rust-src","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1"},{"binary_version":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1","binary_name":"rustc"},{"binary_name":"rustfmt","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1~20.04.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-29922.json"}},{"package":{"name":"rustc","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/rustc@1.53.0+dfsg1+llvm-4ubuntu1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.53.0+dfsg1+llvm-4ubuntu1"}]}],"versions":["1.51.0+dfsg1+llvm-1~exp3ubuntu1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libstd-rust-1.53","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1"},{"binary_name":"rust-all","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1"},{"binary_name":"rust-clippy","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1"},{"binary_name":"rust-gdb","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1"},{"binary_name":"rust-lldb","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1"},{"binary_name":"rust-src","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1"},{"binary_name":"rustc","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1"},{"binary_name":"rustfmt","binary_version":"1.53.0+dfsg1+llvm-4ubuntu1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-29922.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}