Package: netdisco-mibs-installer Version: 1.5 Severity: normal Tags: upstream patch
If you run netdisco-mibs-download twice, the second run exits with status 3 and the following error message: /tmp/netdisco-mibs exists and is not a root-owned directory with permissions set to 0755 (or less) The message was introduced in the fix to #508940 (CVE-2008-5379[0]). That patch contained some faulty bit manipulation in Perl. In essence, the code assumes that the following snippet outputs 0, but it doesn't: $ perl -Mfeature=say -e 'say 0755 - "0755"' -262 The bug is present in netdisco-mibs-installer 1.5 (squeeze) all the way to 1.7.1 (the latest upstream release). -- System Information: Debian Release: 6.0.7 APT prefers oldstable-updates APT policy: (500, 'oldstable-updates'), (500, 'oldstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages netdisco-mibs-installer depends on: ii libwww-perl 5.836-1 Perl HTTP/WWW client/server librar ii perl 5.10.1-17squeeze6 Larry Wall's Practical Extraction netdisco-mibs-installer recommends no packages. Versions of packages netdisco-mibs-installer suggests: pn netdisco-backend <none> (no description available) pn netdisco-frontend <none> (no description available)
--- /usr/sbin/netdisco-mibs-download 2010-09-28 04:03:01.000000000 -0700 +++ /tmp/netdisco-mibs-download 2013-05-21 10:40:01.635530382 -0700 @@ -20,7 +20,7 @@ if (-e $destdir) { my @stat = stat($destdir); - my $mode = sprintf('%04o', $stat[2] & 07777); + my $mode = $stat[2] & 07777; my $maxmode = 0755; - if (! -d $destdir or $stat[4] != 0 or $maxmode - $mode) { + if (! -d $destdir or $stat[4] != 0 or $mode & ~$maxmode) { print "$destdir exists and is not a root-owned directory with " . "permissions set to 0755 (or less)\n";