]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix assertion failure in nslookup/dig/mdig when message has multiple SIG(0) options.
authorWitold Kręcicki <wpk@culm.net>
Tue, 5 Mar 2019 14:14:08 +0000 (15:14 +0100)
committerMark Andrews <marka@isc.org>
Tue, 26 Mar 2019 10:32:08 +0000 (21:32 +1100)
commit69d3bb78c2f4da7cc2be1260434bdbb9efa1876a
tree05e97e5651a65e9f08dadcabf93f4fb77ce2d36e
parentddfd5be3b7c797acd21b5cf862322d2d00ffbc15
Fix assertion failure in nslookup/dig/mdig when message has multiple SIG(0) options.

When parsing message with DNS_MESSAGE_BESTEFFORT (used exclusively in
tools, never in named itself) if we hit an invalid SIG(0) in wrong
place we continue parsing the message, and put the sig0 in msg->sig0.
If we then hit another sig0 in a proper place we see that msg->sig0
is already 'taken' and we don't free name and rdataset, and we don't
set seen_problem. This causes an assertion failure.
This fixes that issue by setting seen_problem if we hit second sig0,
tsig or opt, which causes name and rdataset to be always freed.

(cherry picked from commit 51a55ddbb73f8707de3d1b8cda15c8f61585bacb)
lib/dns/message.c