[PR #3047] [MERGED] preserve_rdata fuzzer improvements #3518

Closed
opened 2026-03-16 11:47:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3047
Author: @divergentdave
Created: 6/12/2025
Status: Merged
Merged: 6/13/2025
Merged by: @divergentdave

Base: mainHead: david/preserve-rdata-fuzzer-improvements


📝 Commits (2)

  • 149ca21 Ignore fuzzer inputs with invalid compressed names
  • cfedbd7 Handle reordering of OPT RR in additional section

📊 Changes

1 file changed (+143 additions, -6 deletions)

View changed files

📝 fuzz/fuzz_targets/preserve_rdata.rs (+143 -6)

📄 Description

This makes two fixes to the preserve_rdata fuzzer to address false positives. First, any records with compressed names inside their RDATA that should not have them are ignored. Hickory DNS would (rightfully) not compress names when writing them back out again, so we skip further comparisons. Second, Hickory DNS reorders any single OPT record in the additional section to go after all other records except SIG(0)/TSIG. To deal with this, we sort the records with a key function, so that the records in the two vectors line up again.

Closes #2941


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/3047 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 6/12/2025 **Status:** ✅ Merged **Merged:** 6/13/2025 **Merged by:** [@divergentdave](https://github.com/divergentdave) **Base:** `main` ← **Head:** `david/preserve-rdata-fuzzer-improvements` --- ### 📝 Commits (2) - [`149ca21`](https://github.com/hickory-dns/hickory-dns/commit/149ca21bb6efd0dd7150599a042260c80834081f) Ignore fuzzer inputs with invalid compressed names - [`cfedbd7`](https://github.com/hickory-dns/hickory-dns/commit/cfedbd7b9609f0f4aea8c47729fc3b4a6c21a7e5) Handle reordering of OPT RR in additional section ### 📊 Changes **1 file changed** (+143 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `fuzz/fuzz_targets/preserve_rdata.rs` (+143 -6) </details> ### 📄 Description This makes two fixes to the `preserve_rdata` fuzzer to address false positives. First, any records with compressed names inside their RDATA that should not have them are ignored. Hickory DNS would (rightfully) not compress names when writing them back out again, so we skip further comparisons. Second, Hickory DNS reorders any single OPT record in the additional section to go after all other records except SIG(0)/TSIG. To deal with this, we sort the records with a key function, so that the records in the two vectors line up again. Closes #2941 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:47:59 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3518
No description provided.