RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1570649 - pwdhash segfaults when CRYPT storage scheme is used
Summary: pwdhash segfaults when CRYPT storage scheme is used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: RHDS QE
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-23 11:35 UTC by Viktor Ashirov
Modified: 2020-09-13 22:09 UTC (History)
4 users (show)

Fixed In Version: 389-ds-base-1.3.8.2-1.el7
Doc Type: Bug Fix
Doc Text:
The *pwdhash* utility no longer crashes when using the *CRYPT* password storage scheme Previously, the *pwdhash* utility used an invalid mutex lock when creating a hash using the *CRYPT* password storage scheme. As a consequence, *pwdhash* failed with a segmentation fault error. With this update, the utility uses the re-entrant form of the "crypt()" function that does not require a lock. As a result, *pwdhash* no longer crashes when using the *CRYPT* password storage scheme.
Clone Of:
Environment:
Last Closed: 2018-10-30 10:13:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2708 0 None None None 2020-09-13 22:09:15 UTC
Red Hat Product Errata RHSA-2018:3127 0 None None None 2018-10-30 10:14:32 UTC

Description Viktor Ashirov 2018-04-23 11:35:14 UTC
Description of problem:
pwdhash -s CRYPT Secret123 
Segmentation fault (core dumped)

Version-Release number of selected component (if applicable):
389-ds-base-1.3.7.5-18.el7.x86_64

How reproducible:
always


Additional info:
(gdb) r
Starting program: /usr/bin/pwdhash -s CRYPT Secret123
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
__GI___pthread_mutex_lock (mutex=mutex@entry=0x0) at ../nptl/pthread_mutex_lock.c:66
66	  unsigned int type = PTHREAD_MUTEX_TYPE_ELISION (mutex);
(gdb) bt 
#0  __GI___pthread_mutex_lock (mutex=mutex@entry=0x0) at ../nptl/pthread_mutex_lock.c:66
#1  0x00007ffff60a4ed9 in PR_Lock (lock=0x0) at ../../../nspr/pr/src/pthreads/ptsynch.c:176
#2  0x00007ffff09aaef1 in crypt_pw_enc_by_hash (pwd=0x555555f5a4e0 "Secret123", hash_algo=0) at ldap/servers/plugins/pwdstorage/crypt_pwd.c:116
#3  0x0000555555555cdf in main (argc=4, argv=0x7fffffffddc8) at ldap/servers/slapd/tools/pwenc.c:243

Comment 1 Viktor Ashirov 2018-04-23 11:40:44 UTC
Storage schemes CRYPT-MD5, CRYPT-SHA256, CRYPT-SHA512 are also producing a crash.

Comment 2 mreynolds 2018-04-23 13:51:39 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/49649

Comment 3 mreynolds 2018-04-24 15:04:48 UTC
Fixed upstream

Comment 5 Viktor Ashirov 2018-06-13 21:21:47 UTC
Build tested: 389-ds-base-1.3.8.2-1.el7.x86_64

[root@rhel7 ~]# pwdhash -s CRYPT Secret123 
{crypt}upGHyxEsqa2OI

[root@rhel7 ~]# pwdhash -s CRYPT-MD5 Secret123 
{crypt}$1$8U$fbOhv2rxs2qCRX7tOEn7G/

[root@rhel7 ~]# pwdhash -s CRYPT-SHA256 Secret123 
{crypt}$5$ln$8ok5Y89Ih1bUzeZeER5i1zDqKqF0qrmcBdDJTq/UZd6

[root@rhel7 ~]# pwdhash -s CRYPT-SHA512 Secret123 
{crypt}$6$ul$iAPE8NfptLzwYBjXbZPXlVf98jjDRnw225uCaYPeay1TlROsz9RPHuAHoQiOFRwRGODy2.wUBgwLlijLav8MV/

pwdhash no longer crashes, marking as VERIFIED.

Comment 9 errata-xmlrpc 2018-10-30 10:13:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:3127


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