Red Hat Bugzilla – Bug 1570649
pwdhash segfaults when CRYPT storage scheme is used
Last modified: 2018-10-30 06:14:33 EDT
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
Storage schemes CRYPT-MD5, CRYPT-SHA256, CRYPT-SHA512 are also producing a crash.
Upstream ticket: https://pagure.io/389-ds-base/issue/49649
Fixed upstream
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.
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