]> git.kaiwu.me - nginx.git/commit
Resolver: fixed label types handling in ngx_resolver_copy().
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 25 May 2021 12:17:41 +0000 (15:17 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 25 May 2021 12:17:41 +0000 (15:17 +0300)
commitbbd403a7ab3810fe82ecd1d6ebca9fc34d68126a
tree12599e7139d52e391e80871a18b27070952d2aaf
parent077a890a76fff4f071776184aed881b5f314c98a
Resolver: fixed label types handling in ngx_resolver_copy().

Previously, anything with any of the two high bits set were interpreted
as compression pointers.  This is incorrect, as RFC 1035 clearly states
that "The 10 and 01 combinations are reserved for future use".  Further,
the 01 combination is actually allocated for EDNS extended label type
(see RFC 2671 and RFC 6891), not really used though.

Fix is to reject unrecognized label types rather than misinterpreting
them as compression pointers.
src/core/ngx_resolver.c