[GH-ISSUE #1805] Fuzzing fails on truncated messages #773

Open
opened 2026-03-16 00:12:06 +03:00 by kerem · 0 comments
Owner

Originally created by @djc on GitHub (Oct 18, 2022).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1805

While fuzzing we parse the fuzzed byte stream. If the bytes parse as a valid message, we re-encode that message and compare the result to the original message. This seems to mostly work pretty well, except that our encoder sets a maximal message size (u16::MAX) so messages which were longer get truncated. However, the fuzzing comparison code (messages_equal()) doesn't seem to account for that. Writing the code to do this is not hard, but pretty boring.

Originally created by @djc on GitHub (Oct 18, 2022). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1805 While fuzzing we parse the fuzzed byte stream. If the bytes parse as a valid message, we re-encode that message and compare the result to the original message. This seems to mostly work pretty well, except that our encoder sets a maximal message size (`u16::MAX`) so messages which were longer get truncated. However, the fuzzing comparison code (`messages_equal()`) doesn't seem to account for that. Writing the code to do this is not hard, but pretty boring.
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#773
No description provided.