mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #744] [CLOSED] Do not fail on parsing an empty Option at the end of an EDNS record #1650
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#1650
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?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/744
Author: @jonasbb
Created: 4/9/2019
Status: ❌ Closed
Base:
master← Head:fix-empty-option-at-end-of-edns📝 Commits (2)
b9af6d6Do not fail on parsing an empty Option within an EDNS record02f5755Only use minimal feature set from futures📊 Changes
2 files changed (+43 additions, -7 deletions)
View changed files
📝
crates/proto/Cargo.toml(+1 -1)📝
crates/proto/src/rr/rdata/opt.rs(+42 -6)📄 Description
The old implementation has trouble parsing an option with length 0 at
the end of the EDNS OPT record. The while loop parsing the data will end
in the
OptReadState::Datastate, but expects to read 0 additionalbytes. For this special condition, we can create the last option after
the loop.
I added a test case for parsing one such case. Here is a screenshot of wireshark parsing the DNS message:

It is unfortunate, that parsing succeeds, even though the code is not able to process all options correctly.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.