Bug 1788196
| Summary: | sudo allows privilege escalation with expire password | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Carl Thompson <fedora> | ||||||
| Component: | sudo | Assignee: | Radovan Sroka <rsroka> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Dalibor Pospíšil <dapospis> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.8 | CC: | dapospis, huzaifas, tjaros | ||||||
| Target Milestone: | rc | Keywords: | AutoVerified, Security | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | No Doc Update | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 1815164 (view as bug list) | Environment: | |||||||
| Last Closed: | 2020-09-29 19:56:45 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1815164 | ||||||||
| Attachments: |
|
||||||||
|
Description
Carl Thompson
2020-01-06 16:55:58 UTC
Carl, Are you able to reproduce this on rhel-8 or fedora. It seems like RHEL/Fedora has a PAM configuration which blocks users with expired passwords from logging, Can you pls confirm? I have not tested this on a RHEL 8 system. It does not affect RHEL 6 because of code changes between 6 and 7 in sudo. We ran into this issue when utilizing LDAP. Sudo privileges configured locally. The sudo caches the expired password as valid and prompts for a password change. However, if you cancel out of password change dialog and simply run sudo again the cached validation of the expired password is enough to allow escalation, not prompting for password change again. (In reply to Carl Thompson from comment #3) > I have not tested this on a RHEL 8 system. It does not affect RHEL 6 > because of code changes between 6 and 7 in sudo. > > We ran into this issue when utilizing LDAP. Sudo privileges configured > locally. The sudo caches the expired password as valid and prompts for a > password change. However, if you cancel out of password change dialog and > simply run sudo again the cached validation of the expired password is > enough to allow escalation, not prompting for password change again. It seems like this issue was introduced via cab448ac8633 which was released via sudo-1.8.23, so rhel-7/8 may be affected. We are still trying to reproduce this issue here. (In reply to Carl Thompson from comment #3) > I have not tested this on a RHEL 8 system. It does not affect RHEL 6 > because of code changes between 6 and 7 in sudo. > > We ran into this issue when utilizing LDAP. Sudo privileges configured > locally. The sudo caches the expired password as valid and prompts for a > password change. However, if you cancel out of password change dialog and > simply run sudo again the cached validation of the expired password is > enough to allow escalation, not prompting for password change again. Hi Carl, We tested this on rhel-6/7/8 and we could not reproduce this on any of the platforms with standard PAM configuration shipped with stock RHEL. It seems that though the bug may exist in sudo, the PAM configurations shipped with RHEL stop the flaw from manifesting. Could you share your configurations you use (PAM etc) so that we can try to reproduce this at our end? Thanks! I know we have seen this in our systems here. As soon as I get a chance I will setup a complete environment that is easy for you to duplicate with instructions on how I have it setup to attempt to duplicate this. I will be utilizing FreeIPA for LDAP and test against RHEL 6/7/8 Created attachment 1671514 [details]
proposed patch1
Created attachment 1671515 [details]
proposed patch2
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 (sudo bug fix and enhancement update), 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/RHBA-2020:3930 |