Bug 1771690 (CVE-2019-18684)

Summary: CVE-2019-18684 sudo: privilege escalation via write access to file descriptor 3 of the sudo process
Product: [Other] Security Response Reporter: msiddiqu
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dapospis, dkopecek, kzak, mattdm, rsroka, tjaros, tosykora, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-18 13:26:16 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:
Bug Depends On:    
Bug Blocks: 1771692    

Description msiddiqu 2019-11-12 19:18:46 UTC
Sudo through 1.8.29 allows local users to escalate to root if they have writeaccess to file descriptor 3 of the sudo process. This occurs because of a racecondition between determining a uid, and the setresuid and openat system calls.The attacker can write "ALL ALL=(ALL) NOPASSWD:ALL" to /proc/#####/fd/3 at atime when Sudo is prompting for a password.

References: 
 
https://gist.github.com/oxagast/51171aa161074188a11d96cbef884bbd

Comment 1 Riccardo Schirone 2019-11-18 13:26:16 UTC
Closing this flaw bug as NOTABUG as the CVE has been DISPUTED.

To be able to access /proc/<sudo-pid>/fd/<sudoers-fd>, an attacker should already be able to access it.