You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On customer systems I am encountering some unusual domain name encodings across various kinds of records, including NSEC and PTR. Here is a good example:
Notice the PTR record whose 16-bit length starts at offset 0x72. It says the record payload is 0x0003 bytes long. Where the domain name should be, we get the bytes 80 0c 00. Every RFC I read about DNS and MDNS says this should not be allowed. They all say the upper two bits of the first byte should be zeroes, or both should be ones. Anything else is "reserved for future use". But in this case 0x80 is 10000000 in binary.
My best guess is this a variant of domain name compression. It looks like it is similar to the 0xc0 pattern, only the referred string is a prefix, not a suffix. The 0x0c appears to be a pointer to the string "_services._dns-sd._udp.local.". Then the decoder presumably is supposed to come back to read the rest of the string at offset 0x76. The third byte 0x00 at offset 0x76 appears to terminate the string. I suppose more domain name text could appear here, hence my interpretation of a prefix encoding.
Has anyone else seen this sort of thing? I'd love to know where this encoding is documented. It really screws up decoding a domain name if you don't know about it. There probably needs to be a fix in Zeroconf/Dns/RecordReader.cs function ReadDomainName, if this can be nailed down.
The text was updated successfully, but these errors were encountered:
On customer systems I am encountering some unusual domain name encodings across various kinds of records, including NSEC and PTR. Here is a good example:
Notice the PTR record whose 16-bit length starts at offset 0x72. It says the record payload is 0x0003 bytes long. Where the domain name should be, we get the bytes 80 0c 00. Every RFC I read about DNS and MDNS says this should not be allowed. They all say the upper two bits of the first byte should be zeroes, or both should be ones. Anything else is "reserved for future use". But in this case 0x80 is 10000000 in binary.
My best guess is this a variant of domain name compression. It looks like it is similar to the 0xc0 pattern, only the referred string is a prefix, not a suffix. The 0x0c appears to be a pointer to the string "_services._dns-sd._udp.local.". Then the decoder presumably is supposed to come back to read the rest of the string at offset 0x76. The third byte 0x00 at offset 0x76 appears to terminate the string. I suppose more domain name text could appear here, hence my interpretation of a prefix encoding.
Has anyone else seen this sort of thing? I'd love to know where this encoding is documented. It really screws up decoding a domain name if you don't know about it. There probably needs to be a fix in
Zeroconf/Dns/RecordReader.cs
functionReadDomainName
, if this can be nailed down.The text was updated successfully, but these errors were encountered: