Bug 1228571 (CVE-2015-3238) - CVE-2015-3238 pam: DoS/user enumeration due to blocking pipe in pam_unix module
Summary: CVE-2015-3238 pam: DoS/user enumeration due to blocking pipe in pam_unix module
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2015-3238
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1233234 1233236 1249067 1249068 1249069 1249070
Blocks: 1222875
TreeView+ depends on / blocked
 
Reported: 2015-06-05 08:46 UTC by Stefan Cornelius
Modified: 2023-05-12 09:31 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-06-08 02:41:35 UTC
Embargoed:


Attachments (Terms of Use)
The patch limiting the supported password length to 512 bytes (5.54 KB, patch)
2015-06-15 09:29 UTC, Tomas Mraz
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1640 0 normal SHIPPED_LIVE Moderate: pam security update 2015-08-18 22:45:27 UTC

Description Stefan Cornelius 2015-06-05 08:46:24 UTC
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."

Acknowledgements:

Red Hat would like to thank Sebastien Macke of Trustwave SpiderLabs for reporting this issue.

Comment 2 Tomas Mraz 2015-06-15 09:27:29 UTC
So we (as PAM upstream developers) acknowledge the issue. I developed a patch that was reviewed by peer upstream developers and we will do a release after vendor notification.
Can we get a CVE assigned?

Comment 3 Tomas Mraz 2015-06-15 09:29:24 UTC
Created attachment 1038860 [details]
The patch limiting the supported password length to 512 bytes

Comment 12 Stefan Cornelius 2015-06-25 18:56:15 UTC
Public via: http://www.openwall.com/lists/oss-security/2015/06/25/13

Comment 13 Fedora Update System 2015-06-30 20:20:41 UTC
pam-1.1.8-19.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2015-07-03 18:39:08 UTC
pam-1.1.8-19.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Ashok Kumar Rajendran 2015-07-06 23:52:30 UTC
In the patch provided

linux-pam/modules/pam_unix/pam_unix_passwd.c
 static int _unix_run_update_binary

There is a "else" missing for both "if (fromwhat) " and "if (towhat)", Hence this ends up in writing  "pam_modutil_write(fds[1], "", 1);" irrespective of the value. Is it something expected or is it a bug in the patch?

Thanks,
-

Comment 16 Tomas Mraz 2015-07-07 07:51:24 UTC
Yes, that is fully intentional as we need to write the NULL byte as well.

Comment 19 errata-xmlrpc 2015-08-18 18:45:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7
  Red Hat Enterprise Linux 6

Via RHSA-2015:1640 https://rhn.redhat.com/errata/RHSA-2015-1640.html


Note You need to log in before you can comment on or make changes to this bug.