Bug 934920 (CVE-2015-3238) - VUL-1: CVE-2015-3238: pam: Security issue in pam_unix module with SELinux enabled
Summary: VUL-1: CVE-2015-3238: pam: Security issue in pam_unix module with SELinux ena...
Status: RESOLVED FIXED
Alias: CVE-2015-3238
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:
Whiteboard: CVSSv2:NVD:CVE-2015-3238:5.8:(AV:N/AC...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 12:02 UTC by Thorsten Kukuk
Modified: 2019-10-24 14:41 UTC (History)
7 users (show)

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


Attachments
pam-password-limit.patch (5.54 KB, patch)
2015-06-16 12:03 UTC, Thorsten Kukuk
Details | Diff
linux-pam-CVE-2015-3238.patch (4.31 KB, patch)
2015-06-17 13:41 UTC, Andreas Stieger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Kukuk 2015-06-16 12:02:54 UTC
From the Red Hat Developer (Tomas Mraz):

Red Hat security response team got a security issue reported against the
Linux-PAM namely the pam_unix module. Copying report from the (private)
bugzilla:

>From the original report:
"If SELinux is enabled, the _unix_run_helper_binary function in Linux-PAM 1.1.8
and earlier hangs indefinitely when verifying a password of 65536 characters,
which allows attackers to conduct username enumeration and denial of service
attacks.

When supplying a password of 65536 characters or more, the process will block
on the write(2) call at modules/pam_unix/support.c:614 because it tries to
write strlen(passwd)+1 bytes to a blocking pipe and a pipe has a limited
capacity of 65536 bytes on Linux."


Embargo date is under discussion most likely next week.
Comment 1 Thorsten Kukuk 2015-06-16 12:03:39 UTC
Created attachment 638054 [details]
pam-password-limit.patch
Comment 2 Thorsten Kukuk 2015-06-16 12:04:12 UTC
Between 1.2.0 is affected, too.
Comment 3 Swamp Workflow Management 2015-06-16 22:00:14 UTC
bugbot adjusting priority
Comment 4 Thorsten Kukuk 2015-06-17 09:48:22 UTC
Looks like Thursday, 25th, 14:00 UTC (16:00 CEST) will be the CRD for this issue.
Comment 5 Andreas Stieger 2015-06-17 09:54:56 UTC
CRD: 2015-06-25 14:00 UTC
Comment 6 Andreas Stieger 2015-06-17 13:41:48 UTC
Created attachment 638220 [details]
linux-pam-CVE-2015-3238.patch
Comment 7 Andreas Stieger 2015-06-17 13:42:34 UTC
Via distros, with CVE and (code) identical patch:

The Linux-PAM project has been notified about a security issue
in the pam_unix module.  The issue is currently under embargo
with the CRD set to 2015-06-25 14:00 UTC.

If the process executing pam_sm_authenticate or pam_sm_chauthtok method
of pam_unix is not privileged enough to check the password, e.g.
if selinux is enabled, the _unix_run_helper_binary function is called.
When a long enough password is supplied (16 pages or more, i.e. 65536+
bytes on a system with 4K pages), this helper function hangs
indefinitely, blocked in the write(2) call while writing to a blocking
pipe that has a limited capacity.

This bug may have security implications, e.g. allowing potential
attackers to conduct username enumeration and denial of service attacks.

We would like to thank Sebastien Macke of Trustwave SpiderLabs for
the original bug report and Red Hat security response team for
forwarding this issue and assigning it CVE-2015-3238.

The code implementing pam_exec expose_authtok option and
pam_unix_passwd.c has a similar issue but its security implications
are not obvious.

Tomas Mraz has prepared a fix that is going to be applied in the next
release of Linux-PAM.  With this fix, the verifiable password length
will be limited to PAM_MAX_RESP_SIZE bytes (i.e. 512 bytes).

An alternative approach to fix this issue (implemented in such modules
as pam_tcb) is to temporary ignore SIGPIPE and check for a failed/short
write.  This alternative was considered too complex for a security fix,
though, and the simpler fix was chosen.
Comment 8 Marcus Meissner 2015-06-25 21:11:42 UTC
is public now

Date: Thu, 25 Jun 2015 21:38:16 +0300
From: "Dmitry V. Levin" <ldv@altlinux.org>
Subject: [oss-security] Linux-PAM 1.2.1 released to address CVE-2015-3238

Hello,

The Linux-PAM project has released a new version to address
a security issue in the pam_unix module.

If the process executing pam_sm_authenticate or pam_sm_chauthtok method
of pam_unix is not privileged enough to check the password, e.g.
if selinux is enabled, the _unix_run_helper_binary function is called.
When a long enough password is supplied (16 pages or more, i.e. 65536+
bytes on a system with 4K pages), this helper function hangs
indefinitely, blocked in the write(2) call while writing to a blocking
pipe that has a limited capacity.

This bug may have security implications, e.g. allowing potential
attackers to conduct username enumeration and denial of service attacks.

We would like to thank Sebastien Macke of Trustwave SpiderLabs for
the original bug report and Red Hat security response team for
forwarding this issue.

The code implementing pam_exec expose_authtok option and
pam_unix_passwd.c had a similar issue but its security implications
are not obvious.

In the fix prepared by Tomas Mraz for this Linux-PAM release the
verifiable password length is limited to PAM_MAX_RESP_SIZE bytes
(i.e. 512 bytes).

An alternative approach to fix this issue (implemented in such modules
as pam_tcb) is to temporary ignore SIGPIPE and check for a failed/short
write.  This alternative was considered too complex for a security fix,
though, and the simpler fix was chosen.


--=20
ldv
Comment 10 Swamp Workflow Management 2016-06-21 14:08:32 UTC
SUSE-SU-2016:1645-1: An update that solves two vulnerabilities and has one errata is now available.

Category: security (moderate)
Bug References: 854480,934920,962220
CVE References: CVE-2013-7041,CVE-2015-3238
Sources used:
SUSE Linux Enterprise Software Development Kit 11-SP4 (src):    pam-1.1.5-0.17.2
SUSE Linux Enterprise Server 11-SP4 (src):    pam-1.1.5-0.17.2
SUSE Linux Enterprise Debuginfo 11-SP4 (src):    pam-1.1.5-0.17.2
Comment 11 Swamp Workflow Management 2017-05-24 19:11:24 UTC
SUSE-SU-2017:1398-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (moderate)
Bug References: 1015565,1037824,934920
CVE References: CVE-2015-3238
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP2 (src):    pam-1.1.8-23.1
SUSE Linux Enterprise Software Development Kit 12-SP1 (src):    pam-1.1.8-23.1
SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src):    pam-1.1.8-23.1
SUSE Linux Enterprise Server 12-SP2 (src):    pam-1.1.8-23.1
SUSE Linux Enterprise Server 12-SP1 (src):    pam-1.1.8-23.1
SUSE Linux Enterprise Desktop 12-SP2 (src):    pam-1.1.8-23.1
SUSE Linux Enterprise Desktop 12-SP1 (src):    pam-1.1.8-23.1
OpenStack Cloud Magnum Orchestration 7 (src):    pam-1.1.8-23.1
Comment 12 Marcus Meissner 2017-06-20 11:41:11 UTC
released
Comment 16 Robert Frohl 2019-10-24 12:00:22 UTC
released