Red Hat Bugzilla – Bug 815993
PATCH: properly deal with crypt() returning NULL
Last modified: 2012-08-21 05:57:36 EDT
the xcrypt() function can use the crypt() function underneath, which can return NULL. But xcrypt() output is blindly strcmp()'ed.
Attached patch addresses this. Patch also send upstream.
crypt() returning NULL can happen in fips mode when the hash algo is not an approved algorithm such as the default MD5...
Created attachment 580036 [details]
patch hanlding crypt() returning NULL
Just note that this code is used only in case UsePAM is set to 'no' which is unsupported configuration. Thus the severity is very low in this case.
The openbsd-compat/port-uw.c patch part doesn't check a return value of the xcrypt() and moreover port-uw.c is not
relevant to our platform so I used an upstream revision 1.91 of auth-passwd.c:
--- auth-passwd.c 8 Mar 2009 00:40:28 -0000 1.90
+++ auth-passwd.c 25 Apr 2012 23:51:28 -0000 1.91
@@ -209,6 +209,7 @@
* Authentication is accepted if the encrypted passwords
* are identical.
- return (strcmp(encrypted_password, pw_password) == 0);
+ return encrypted_password != NULL &&
+ strcmp(encrypted_password, pw_password) == 0;
Thanks for the report.
openssh-5.9p1-26.fc17 has been submitted as an update for Fedora 17.
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openssh-5.9p1-26.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
openssh-5.9p1-26.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.