Repository navigation
Conversation
devnexen
approved these changes
Dec 1, 2026
bukka
requested changes
Dec 1, 2026
bukka
left a comment
Member
There was a problem hiding this comment.
There is a new testing setup so all dns.c changes should now have a test if possible.
Member
|
ah good to know. |
Contributor
Author
|
I tried to add one with the BIND setup, but BIND refuses to load an A record with less than 4 bytes of RDATA. Even the generic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For an A record,
php_parserr()only checked that 4 bytes were left in the whole message, not in the record itself. With an RDLENGTH below 4, the missing bytes came from the next record, sodns_get_record()returned a made-up address like9.192.12.0. A short A record is now treated as malformed, the same way other bad RDATA already goes tofail.CHECKCP(dlen)already runs before the switch, sodlen >= 4also keeps the read inside the message. I checked it with the reporter's fake DNS server: the bogus record is gone and well-formed replies are unchanged. No .phpt, since the BIND server used by the DNS tests won't serve an A record with short RDATA.Fixes #25968