NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming
https://nlnetlabs.nl/ldns
BSD 3-Clause "New" or "Revised" License
292 stars 97 forks source link

ldns-dane fails with assertion error in 1.8.2 #183

Closed anandb-ripencc closed 2 years ago

anandb-ripencc commented 2 years ago

With version 1.8.1 of ldns, the ldns-dane utility worked properly. However, after the upgrade to 1.8.2, it fails thus:

% ldns-dane create th-cho-as137566.anchors.atlas.ripe.net 443
Assertion failed: (rd != NULL), function ldns_rdf_size, file rdata.c, line 26.
[1]    51743 abort      ldns-dane create th-cho-as137566.anchors.atlas.ripe.net 443

This is on macOS 12.5, on a fully up to date system. I installed ldns from Homebrew, and earlier today, it got upgraded to 1.8.2 when I upgraded packages.

leahneukirchen commented 2 years ago

This also happens for drill -D and ssh with VerifyHostKeyDNS yes, see https://github.com/void-linux/void-packages/issues/38669.

Jakker commented 2 years ago

A similar problem has reported for FreeBSD, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265814

wtoorop commented 2 years ago

Thanks! This was unfortunately (and surprisingly) not covered in one of the unit tests. I have a fix committed (and attached in this comment as patch). I will make a quickfix 1.8.3 release with this fix shortly.

0001-Issue-183-EDNS-OPT-can-have-no-rdata.patch.gz

wtoorop commented 2 years ago

ldns-1.8.3 has been released with a quickfix for this. Thank you @anandb-ripencc @leahneukirchen @Jakker for reporting this so promptly

anandb-ripencc commented 2 years ago

Could you please tag 1.8.3 in GitHub too? Some projects, like Homebrew, look at the GitHub tags to determine whether a newer version is available or not, and without the tag, I can't update the Homebrew formula.

wtoorop commented 2 years ago

Could you please tag 1.8.3 in GitHub too? Some projects, like Homebrew, look at the GitHub tags to determine whether a newer version is available or not, and without the tag, I can't update the Homebrew formula.

Ack! I made it, but forgot to push. Now pushed.