[Pkg-nagios-devel] Bug#479013: check_dig: no check for mandatory parameter -l

Stephane Chazelas stephane at artesyncp.com
Fri May 2 08:54:26 UTC 2008


Package: nagios-plugins
Version: 1.4.11-2
Severity: minor


Hiya,

$ ./check_dig -h
check_dig v1590 (nagios-plugins 1.4.11)
[...]
Usage:check_dig -H host -l lookup [-p <server port>] [-T <query type>] [-w <warning interval>] [-c <critical interval>] [-t <timeout>] [-a <expected answer address>] [-v]

"-l lookup" is meant to be a mandatory option. But,

/usr/lib/nagios/plugins$ ./check_dig -H localhost -v
/usr/bin/dig @localhost -p 53 (null) -t A
Looking for: '(null)'
DNS UNKNOWN - 0.767 seconds response time (No ANSWER SECTION found)|time=0.767500s;;;0.000000

asnprintf is called with a NULL parameter. That would cause a
SEGV if GNU libc's asnprintf wasn't nice enough to replace the
NULL with "(null)".

fix would be to report an error if "-l" is not provided.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24.2
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_GB.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages nagios-plugins depends on:
ii  nagios-plugins-basic          1.4.11-2   Plugins for the nagios network mon
ii  nagios-plugins-standard       1.4.11-2   Plugins for the nagios network mon

nagios-plugins recommends no packages.

-- debconf-show failed





More information about the Pkg-nagios-devel mailing list