Bug#693320: libnet-server-perl: Uninitialized value in pattern match spam

Patrick Matthäi pmatthaei at debian.org
Thu Nov 15 14:07:14 UTC 2012


Package: libnet-server-perl
Version: 2.006-1
Severity: important
Tags: patch

Using munin-node on Wheezy the /var/log/munin-node.log is spammed down with
this entries:

	Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Net/Server.pm line 600.

This is because of some missing variable checking and wrong order of checking for them.
Please also add this for Wheezy.


--- Server.pm.orig      2012-11-15 14:51:16.825804448 +0100
+++ Server.pm   2012-11-15 15:05:56.025792549 +0100
@@ -597,10 +597,10 @@

     # if the addr or host isn't blocked yet, allow it if it is allowed
     foreach (@{ $prop->{'allow'} }) {
-        return 1 if $prop->{'peerhost'} =~ /^$_$/ && defined $prop->{'reverse_lookups'};
-        return 1 if $peeraddr =~ /^$_$/;
+        return 1 if defined $prop->{'reverse_lookups'} && defined $prop->{'peerhost'} && $prop->{'peerhost'} =~ /^$_$/;
+       return 1 if defined $peeraddr && $peeraddr =~ /^$_$/;
     }
-    if (@{ $prop->{'cidr_allow'} }) {
+    if (defined $peeraddr && defined @{ $prop->{'cidr_allow'} }) {
         require Net::CIDR;
         return 1 if Net::CIDR::cidrlookup($peeraddr, @{ $prop->{'cidr_allow'} });
     }



-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libnet-server-perl depends on:
ii  libio-multiplex-perl     1.13-1
ii  libio-socket-inet6-perl  2.69-2
ii  libnet-cidr-perl         0.15-1
ii  libsocket6-perl          0.23-1+b2
ii  perl                     5.14.2-15

libnet-server-perl recommends no packages.

Versions of packages libnet-server-perl suggests:
ii  libio-socket-ssl-perl  1.76-2
pn  liblog-log4perl-perl   <none>
ii  libnet-ssleay-perl     1.48-1+b1

-- no debconf information



More information about the pkg-perl-maintainers mailing list