mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #2941] preserve_rdata fuzzer: Gracefully handle inputs with compressed names in the wrong places #1098
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#1098
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @divergentdave on GitHub (Apr 18, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2941
Fuzzer input may produce records that use compressed names inside RDATA for record types that are not allowed to use compressed names. Hickory DNS can currently handle such cases, decompressing the names so long as the record type is supported, and I think we should keep it that way. Thus, the fuzzer will need some additional logic for each record type Hickory DNS supports that contains embedded names. For the well-known record types, we already decompress names in the original fuzzer input, and decompress names in the output of Hickory DNS's decoding and re-encoding, to account for allowable differences in representation. For these remaining record types, where name compression is not allowed by the RFCs, we need to decompress names in the fuzzer input, and compare that directly to the Hickory DNS re-encoding output.
I plan to put this off for now, until after fixing some other issues revealed by this fuzzer (i.e. #2925 and #2934).
@divergentdave commented on GitHub (Jun 11, 2025):
An easier way to handle messages with compressed names in the wrong places would be to reject the fuzzer input, and exit with success before doing any further decoding or comparison. This will still require the fuzzer to independently parse RDATA for each record type that Hickory DNS supports, but we'd just have to check each name label, not do any re-encoding.