Re:What I learned from making a DNS client in Rust
by ate53 on Monday April 11, 2022 @06:03AM
(#30986667)
It's a viable strategy. No legitimate implementation produces compression pointers that go anywhere other than backwards. I track the start of a label sequence and whether I've followed a pointer. If I've just followed a pointer, I must be at a point earlier than the last start, or I consider it a malicious name. I also disallow pointers to pointers but I'm less confident that there's not something out there that does that.
[ Parent
| on HN ]
Re:What I learned from making a DNS client in Rust
by spc476 on Monday April 11, 2022 @06:03PM
(#30995674)
So, using () as a marker for the length of a label, and (^name) for a label pointer, how do you handle
()a()b(^b)
The pointer goes backwards, but it doesn't go back to the start of a label sequence. So do you track the start of each label? Or just the start of each domain name?Edit: nevermind, I see what you are doing.