4 ms·
> A simple fix for that is something like only accepting pointers that point to a lower position and never to a higher one, to prevent stack overflows and buffe
by blincoln 3y ago
> A simple fix for that is something like only accepting pointers that point to a lower position and never to a higher one, to prevent stack overflows and buffer overflows for the parsed label arrays.
Wouldn't the simpler fix be to perform bounds checking before writing to any buffer?
- zbentley 3y agoAbsolutely. Nor would that entail particularly onerous performance penalties in this instance, as DNS interrogation happens relatively rarely. That said, I'd guess this is related to the use of string/array deserialization facilities that are either more general than the DNS parser or were copy/pasted from a domain that makes different assumptions re: the safety and inbound data provenance.