Bug 514061

Summary: yppasswd fails if passwords are SHA512 (or MD5/SHA256)
Product: [Fedora] Fedora Reporter: Kumar Gala <galak>
Component: yp-toolsAssignee: Karel Klíč <kklic>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: rvokal, vcrhonek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: yp-tools-2.9-7.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-20 18:42:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The patch fixing verifypassword() none

Description Kumar Gala 2009-07-27 19:44:26 UTC
The code in yppasswd.c in:

verifypassword (struct passwd *pwd, char *pwdstr, uid_t uid)

assumes password are 13 chars, however with SHA512 or other hash the first 13 chars may not very enough to distinguish the new passwd from the old one:

...
 if (pwd->pw_passwd[0]
      && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), 13)
      && uid)
...

The code needs to change to use the proper password length based on the hash scheme.

Comment 1 Karel Klíč 2010-04-16 11:51:11 UTC
Created attachment 407081 [details]
The patch fixing verifypassword()

This patch merges the -md5 and -sha-2 patches used in Fedora, and adds fixes verifypassword()

Comment 2 Karel Klíč 2010-04-16 12:06:45 UTC
Built for rawhide: yp-tools-2_10-3_fc14
http://koji.fedoraproject.org/koji/buildinfo?buildID=167257

Comment 3 Fedora Update System 2010-04-19 17:36:26 UTC
yp-tools-2.9-9.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/yp-tools-2.9-9.fc12

Comment 4 Fedora Update System 2010-04-19 17:36:31 UTC
yp-tools-2.9-7.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/yp-tools-2.9-7.fc11

Comment 5 Fedora Update System 2010-04-19 17:36:36 UTC
yp-tools-2.10-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/yp-tools-2.10-2.fc13

Comment 6 Fedora Update System 2010-04-21 02:16:59 UTC
yp-tools-2.10-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yp-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yp-tools-2.10-2.fc13

Comment 7 Fedora Update System 2010-04-21 02:20:51 UTC
yp-tools-2.9-9.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yp-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yp-tools-2.9-9.fc12

Comment 8 Fedora Update System 2010-04-21 02:23:45 UTC
yp-tools-2.9-7.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yp-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yp-tools-2.9-7.fc11

Comment 9 Bug Zapper 2010-04-28 09:23:59 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Fedora Update System 2010-05-20 18:42:09 UTC
yp-tools-2.10-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-05-20 18:42:20 UTC
yp-tools-2.9-9.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2010-05-20 18:43:37 UTC
yp-tools-2.9-7.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.