]> 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)
commit3893b483ed2d90f514ffe10a5d1ac12a90b89d4e
tree39d9b2c5536a4f288e96897a130bd61fcd8cf817
parentdbd4dfd19fbd4d894f1215ea84f9c8ec2b3e84fc
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