4.0 MEDIUM
- CVSS version (CVSS): 3.1
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): High (H)
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Scope (S): Changed (C)
- Confidentiality (C): None (N)
- Integrity (I): Low (L)
- Availability (A): None (N)
- Modified Attack Vector (MAV): Network (N)
- Modified Attack Complexity (MAC): High (H)
- Modified Privileges Required (MPR): None (N)
- Modified User Interaction (MUI): None (N)
- Modified Confidentiality (MC): None (N)
- Modified Scope (MS): Changed (C)
- Modified Integrity (MI): Low (L)
- Modified Availability (MA): None (N)
Activity log
- Created suggestion
An issue was discovered in the resolv gem before 0.7.2 …
An issue was discovered in the resolv gem before 0.7.2 for Ruby. Resolv::DNS::MessageEncoder wrote a DNS label's length into a single octet without checking its range. A label longer than 255 octets had its length stored modulo 256 but the label data was written unchanged, and thus the bytes on the wire described a different name than the one the application asked to encode. RFC 1035 section 2.3.4 limits a label to 63 octets, and the two high bits of the length octet are reserved for compression pointers. put_string packed the length with put_pack("C", d.length) and put_label used it for labels, and thus any value from 0 to 255 could end up as a label length octet, including the reserved 0x40-0xBF range and the 0xC0-0xFF pointer range. Resolv::DNS::Name.create did not check per-label or total name length either, and thus an attacker-controlled hostname reached the encoder unchanged. An application that resolves an attacker-controlled hostname sends a query whose wire bytes name a domain the attacker chose. A hostname suffix that the application validates against an allowlist becomes padding that never appears on the wire, and thus allowlist and egress checks can be bypassed. The recursive resolver caches the response under the attacker's name, and DNS logs record that name rather than the one the application asked for. A label length whose low octet lands in the 0xC0-0xFF range produces a length octet that conforming parsers read as the start of a compression pointer, with the following attacker-controlled byte as the offset.
References
Affected products
- <0.7.2
- <0.3.2
Matching in nixpkgs
pkgs.openresolv
Program to manage /etc/resolv.conf
pkgs.flaresolverr
Proxy server to bypass Cloudflare protection
pkgs.knot-resolver
Caching validating DNS resolver, from .cz domain registry
pkgs.resolv_wrapper
Wrapper for the user, group and hosts NSS API
pkgs.davinci-resolve
Professional video editing, color, effects and audio post-processing
pkgs.knot-resolver_5
Caching validating DNS resolver, from .cz domain registry
pkgs.knot-resolver_6
Caching validating DNS resolver, from .cz domain registry
pkgs.darwin.libresolv
Libresolv implementation for Darwin
pkgs.update-resolv-conf
Script to update your /etc/resolv.conf with DNS settings that come from the received push dhcp-options
-
nixos-unstable 2017-06-21
- nixpkgs-unstable 2017-06-21
- nixos-unstable-small 2017-06-21
-
nixos-26.05 2017-06-21
- nixos-26.05-small 2017-06-21
- nixpkgs-26.05-darwin 2017-06-21
pkgs.resolve-march-native
Tool to determine what GCC flags -march=native would resolve into
pkgs.davinci-resolve-studio
Professional video editing, color, effects and audio post-processing
pkgs.haskellPackages.resolv
Domain Name Service (DNS) lookup via the libresolv standard library routines
pkgs.knot-resolver-manager_6
Caching validating DNS resolver, from .cz domain registry
pkgs.update-systemd-resolved
Helper script for OpenVPN to directly update the DNS settings of a link through systemd-resolved via DBus
pkgs.graylogPlugins.dnsresolver
Message filter plugin can be used to do DNS lookups for the source field in Graylog messages
pkgs.ocamlPackages.dns-resolver
DNS resolver business logic
pkgs.python313Packages.resolvelib
Resolve abstract dependencies into concrete ones
pkgs.python314Packages.resolvelib
Resolve abstract dependencies into concrete ones
pkgs.perlPackages.NetDNSResolverMock
Mock a DNS Resolver object for testing
-
nixos-unstable 1.20230216
- nixpkgs-unstable 1.20230216
- nixos-unstable-small 1.20230216
-
nixos-26.05 1.20230216
- nixos-26.05-small 1.20230216
- nixpkgs-26.05-darwin 1.20230216
pkgs.perl5Packages.NetDNSResolverMock
Mock a DNS Resolver object for testing
-
nixos-unstable 1.20230216
- nixpkgs-unstable 1.20230216
- nixos-unstable-small 1.20230216
-
nixos-26.05 1.20230216
- nixos-26.05-small 1.20230216
- nixpkgs-26.05-darwin 1.20230216
pkgs.azure-cli-extensions.dns-resolver
Microsoft Azure Command-Line Tools DnsResolverManagementClient Extension
pkgs.ocamlPackages_latest.dns-resolver
DNS resolver business logic
pkgs.python313Packages.cert-chain-resolver
Resolve / obtain the certificate intermediates of a x509 certificate
pkgs.python314Packages.cert-chain-resolver
Resolve / obtain the certificate intermediates of a x509 certificate
pkgs.python313Packages.pkgutil-resolve-name
Backport of Python 3.9’s pkgutil.resolve_name
pkgs.python314Packages.pkgutil-resolve-name
Backport of Python 3.9’s pkgutil.resolve_name
pkgs.perlPackages.NetDNSResolverProgrammable
Programmable DNS resolver class for offline emulation of DNS
pkgs.haskellPackages.amazonka-route53resolver
Amazon Route 53 Resolver SDK
-
nixos-unstable 2.0-unstable-2025-04-16
- nixpkgs-unstable 2.0-unstable-2025-04-16
- nixos-unstable-small 2.0-unstable-2025-04-16
-
nixos-26.05 2.0-unstable-2025-04-16
- nixos-26.05-small 2.0-unstable-2025-04-16
- nixpkgs-26.05-darwin 2.0-unstable-2025-04-16
pkgs.perl5Packages.NetDNSResolverProgrammable
Programmable DNS resolver class for offline emulation of DNS
pkgs.python313Packages.aiohttp-asyncmdnsresolver
Module to resolve mDNS with aiohttp
pkgs.python314Packages.aiohttp-asyncmdnsresolver
Module to resolve mDNS with aiohttp
pkgs.python313Packages.mypy-boto3-route53resolver
Type annotations for boto3 route53resolver
pkgs.python314Packages.mypy-boto3-route53resolver
Type annotations for boto3 route53resolver
pkgs.python313Packages.types-aiobotocore-route53resolver
Type annotations for aiobotocore route53resolver
pkgs.python314Packages.types-aiobotocore-route53resolver
Type annotations for aiobotocore route53resolver
-
nixos-unstable -
- nixos-unstable-small 3.9.0
Package maintainers
-
@katexochen Paul Meyer <katexochen0@gmail.com>
-
@toonn Toon Nolten <nixpkgs@toonn.io>
-
@reckenrode Randy Eckenrode <randy@largeandhighquality.com>
-
@Samasaur1 Samasaur <sam@samasaur.com>
-
@emilazy Emily <nixpkgs@emily.moe>
-
@cafkafk Christina Sørensen <christina@cafkafk.com>
-
@XBagon XBagon <xbagon@outlook.de>
-
@amarshall Andrew Marshall <andrew@johnandrewmarshall.com>
-
@toXel Timo Arlt
-
@diogotcorreia Diogo Correia <me@diogotc.com>
-
@vcunat Vladimír Čunát <v@cunat.cz>
-
@osnyx Oliver Schmidt <os@flyingcircus.io>
-
@leona-ya Leona Maroni <nix@leona.is>
-
@vbgl Vincent Laporte <Vincent.Laporte@gmail.com>
-
@andir Andreas Rammhold <andreas@rammhold.de>
-
@balsoft Alexander Bantyev <balsoft75@gmail.com>
-
@pyrox0 Pyrox <pyrox@pyrox.dev>
-
@fabaff Fabian Affolter <mail@fabian-affolter.ch>
-
@veehaitch Vincent Haupert <mail@vincent-haupert.de>
-
@yajo Jairo Llopis <yajo.sk8@gmail.com>
-
@lovesegfault Bernardo Meurer <meurerbernardo@gmail.com>
-
@eadwu Edmund Wu <edmund.wu@protonmail.com>