Red Hat Bugzilla – Bug 75454
passwd blocks users from entering password information, if other non-root instance of passwd is running.
Last modified: 2007-03-26 23:57:34 EDT
Description of problem:
If a non-root user runs passwd, this keeps any other non-root users from being
able to run passwd. This creates a way to block users from changing their
passwords, possible security issue.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run "passwd" as a non-root user, leave it at the "current password" prompt.
2. as a different, launch "passwd"
3. Observe not getting "Current Password" prompt on second instance of passwd.
Actual Results: Second instance of passwd will never prompt the user, until the
first instance is finished.
Expected Results: passwd should allow multiple users to enter data
simultaneously, then provide atomic updates to the actual PAM database.
I was able to reproduce this on a 7.2 machine as well, and this is the oldest
system I have. I do not know how far back this regresses.
It also seems that by running "passwd" as a non-root user, it will block root
from being able to run passwd as well. This seems slightly more severe than at
Confirmed in 7.0 and 7.1 too. Ironically enough, a non-root user can block a
root passwd command , but a root passwd doesn't block a non-root user, at least
from the first prompt.
Well, root can always kill the passwd process and then
remove the /etc/.pwd.lock file.
Removing security status. This isn't a security issue.
The only way how to do it right is to obtain the lock only for the
real update of the file. However it is necessary to recheck the old
password to disallow possible races.
I'll try to make a patch.
Created attachment 103587 [details]
Fixed in pam-0.77-56
*** Bug 99357 has been marked as a duplicate of this bug. ***