Bug 808830 (CVE-2013-1841) - VUL-1: CVE-2013-1841: perl-Net-Server: insufficient hostname access checking
Summary: VUL-1: CVE-2013-1841: perl-Net-Server: insufficient hostname access checking
Status: RESOLVED FIXED
Alias: CVE-2013-1841
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/90926/
Whiteboard: CVSSv2:SUSE:CVE-2013-1841:4.3:(AV:N/...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-12 07:04 UTC by Marcus Meissner
Modified: 2024-04-23 13:14 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2013-03-12 07:04:06 UTC
is public, via oss-sec

CVE-2013-1841

Date: Mon, 4 Mar 2013 20:31:14 +0100 (CET)
From: Remi Gacogne <rgacogne-bugs@coredump.fr>
Subject: [oss-security] Reverse lookup issue in Net::Server

Hi,

I think there is a security issue in the way the access control feature
of Net::Server (http://search.cpan.org/perldoc?Net%3A%3AServer) works.
Net::Server is used by various projects including Munin, Postgrey and 
SQLgrey.

The issue lies in the fact that the allow / deny access control
does not perform a valid DNS check when given a hostname parameter
and the 'reverse_lookups' option is enabled.
The current code only checks that the incoming connection source IP
address has a reverse DNS matching the given hostname, but does not
check that the hostname resolves back to this source IP address (see
how the $prop->{'peerhost'} property is set in get_client_info(),
lib/Net/Server.pm:553, then used in allow_deny(), lib/Net/Server.pm:597).
As it is trivial for an attacker to be able to set his own
source IP's reverse DNS, the current check is not safe (this probably
matches CWE-807: Reliance on Untrusted Inputs in a Security Decision).

I think that the valid way would be to do the same checks as
Apache HTTPd does for the Allow / Deny directives (see do_double_reverse()
and ap_get_remote_host() in server/core.c for more information):
"It will do a reverse DNS lookup on the IP address to find the
associated hostname, and then do a forward lookup on the hostname
to assure that it matches the original IP address.
Only if the forward and reverse DNS are consistent and the hostname
matches will access be allowed."

At the very least, the documentation of Net:Server should be updated to
specify exactly what is checked by Net:Server access control, as many
people seem to assume that the check is done in the same way as in Apache 
HTTPd.

So far, I have been unable to reach the Net-Server maintener to discuss 
this matter.

--
Regards,

Remi Gacogne
Comment 1 Swamp Workflow Management 2013-03-12 23:00:24 UTC
bugbot adjusting priority
Comment 2 Marcus Meissner 2013-03-14 07:06:42 UTC
https://rt.cpan.org/Ticket/Display.html?id=83909
Comment 4 Johannes Segitz 2014-04-07 12:50:46 UTC
Can you perhaps ping the upstream ticket system? nothing seems to have happened so far, no new release. (not really important)
Comment 5 SMASH SMASH 2014-04-07 12:55:11 UTC
Affected packages:

SLE-11-SP3: perl-Net-Server
SLE-10-SP3-TERADATA: perl-Net-Server
SLE-9-SP4: perl-Net-Server
SLE-11-SP2: perl-Net-Server
Comment 6 Vítězslav Čížek 2014-04-07 14:37:38 UTC
(In reply to comment #4)
> Can you perhaps ping the upstream ticket system? nothing seems to have happened
> so far, no new release. (not really important)

I just did.
Comment 7 Vítězslav Čížek 2015-08-05 15:14:31 UTC
Still no response to my ping:
https://rt.cpan.org/Public/Bug/Display.html?id=83909#txn-1347684

No activity in the repo since May 12, 2014.
https://github.com/rhandom/perl-net-server/commits/master
Comment 9 Pedro Monreal Gonzalez 2020-07-02 16:57:09 UTC
Still no upstream fix.

JRF, see also:
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702914#36
Comment 10 Pedro Monreal Gonzalez 2023-02-22 10:59:44 UTC
Fixed in version just released version 2.011:
  * https://rt.cpan.org/Transaction/Display.html?id=2395145
Comment 11 Jason Sikes 2023-03-07 02:57:43 UTC
created request id 291468 for SUSE:SLE-15:Update

created request id 291469 for SUSE:SLE-12:Update

Please note that this change adds a parameter that is disabled by default. To enable, set 'reverse_lookups=double' or 'double_reverse_lookups=1'.
Comment 12 Jason Sikes 2023-03-07 03:06:48 UTC
Patch was sourced from:

https://github.com/rhandom/perl-net-server/commit/dd7c587d44b40a225ad90f7559ebf00967f4e5fc

Transferring over to security-team.
Comment 13 Maintenance Automation 2023-03-15 12:30:01 UTC
SUSE-SU-2023:0746-1: An update that solves one vulnerability can now be installed.

Category: security (moderate)
Bug References: 808830
CVE References: CVE-2013-1841
Sources used:
openSUSE Leap 15.4 (src): perl-Net-Server-2.009-150000.3.3.1
Basesystem Module 15-SP4 (src): perl-Net-Server-2.009-150000.3.3.1
SUSE Linux Enterprise Real Time 15 SP3 (src): perl-Net-Server-2.009-150000.3.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 14 Maintenance Automation 2023-03-16 12:30:42 UTC
SUSE-SU-2023:0759-1: An update that solves one vulnerability can now be installed.

Category: security (moderate)
Bug References: 808830
CVE References: CVE-2013-1841
Sources used:
SUSE Linux Enterprise High Performance Computing 12 SP5 (src): perl-Net-Server-2.007-5.3.1
SUSE Linux Enterprise Server 12 SP5 (src): perl-Net-Server-2.007-5.3.1
SUSE Linux Enterprise Server for SAP Applications 12 SP5 (src): perl-Net-Server-2.007-5.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.