Skip Menu |

This queue is for tickets about the Net-DNS-SEC CPAN distribution.

Report information
The Basics
Id: 14064
Status: resolved
Priority: 0/
Queue: Net-DNS-SEC

Owner: Nobody in particular
Requestors: mikem [...]

Bug Information
Severity: Important
Broken in: 0.12_02
Fixed in: (no value)

Subject: dn_comp crash during verify
Download (untitled) / with headers
text/plain 1.4k
perl v5.8.5 on Mandrake 10 Net-DNS-SEC-0.12_02 Net-DNS-0.53 bind 9.3.1 Using verify on some types of RR records fails with a die. works ok with eg. NS and MX records, but fails with eg. NAPTR and AAAA records: Can't call method "dn_comp" on an undefined value at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/DNS/RR/ line 103. at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/DNS/RR/ line 103 Net::DNS::RR::NAPTR::rr_rdata('Net::DNS::RR::NAPTR=HASH(0x8aa4a44)') called at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/DNS/ line 693 Net::DNS::RR::_canonicalRdata('Net::DNS::RR::NAPTR=HASH(0x8aa4a44)') called at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/DNS/ line 675 Net::DNS::RR::_canonicaldata('Net::DNS::RR::NAPTR=HASH(0x8aa4a44)') called at /usr/lib/perl5/site_perl/5.8.5/Net/DNS/RR/ line 844 Net::DNS::RR::RRSIG::_CreateSigData('Net::DNS::RR::RRSIG=HASH(0x8aafc5c)', 'ARRAY(0x89a0970)') called at /usr/lib/perl5/site_perl/5.8.5/Net/DNS/RR/ line 512 Net::DNS::RR::RRSIG::verify('Net::DNS::RR::RRSIG=HASH(0x8aafc5c)', 'ARRAY(0x89a0970)', 'Net::DNS::RR::DNSKEY=HASH(0x8aa61ac)') called at /tmp/ line 40 problem seems to be that eg Net::DNS::RR::NAPTR::rr_rdata() requires that $packet and $offset be defined, but they are not being passed by someone higher in the calling stack. See attached example
text/x-perl 763b
use Net::DNS; use IO::Select; use strict; # see RFC 2915 for format of NAPTR records my $res = Net::DNS::Resolver->new(nameservers => [qw(localhost)], debug => 1, recurse => 0, tcp_timeout => 5, udp_timeout => 5, dnssec => 1, ); my $q = $res->query('', 'DNSKEY'); my $keyrr; foreach ($q->answer) { $keyrr = $_, last if $_->type eq 'DNSKEY'; } my $type = 'MX'; $type = 'NS'; $type = 'NAPTR'; $q = $res->query('', $type); my @answer; my $sigrr; foreach ($q->answer) { if ($_->type eq $type) { push(@answer, $_); print "pushing $_\n"; } elsif ($_->type eq 'RRSIG') { $sigrr = $_; } } print "verify error: " . $sigrr->vrfyerrstr unless $sigrr->verify(\@answer, $keyrr);

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to