Bug 1655925 (CVE-2018-19788)

Summary: CVE-2018-19788 polkit: Improper handling of user with uid > INT_MAX leading to authentication bypass
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, alanm, bmcclain, cpatters, dbaker, dblechte, dfediuck, dmoppert, eedri, fedoraproject, fkrska, jangerrit.kootstra, jokerman, jrybar, kwalker, mgoldboi, michal.skrivanek, mmezynsk, mpoole, polkit-devel, sbonazzo, security-response-team, sherold, sthangav, swells, trankin, yturgema
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-08-06 19:20:18 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: 1655926, 1656377, 1656378, 1757205    
Bug Blocks: 1655928    

Description Andrej Nemec 2018-12-04 09:27:26 UTC
It was found that creating a user of group above INT32_MAX would wrap around the numeric uid or gid. Polkit is not able to handle this properly, resulting in an authentication bypass.

References:

https://seclists.org/oss-sec/2018/q4/198

Upstream issue:

https://gitlab.freedesktop.org/polkit/polkit/issues/74

Proposed patch:

https://gitlab.freedesktop.org/zbyszek/polkit/commit/fbaab32cb4ed9ed5f1e3eea6cd317d443aa427dc

Comment 1 Andrej Nemec 2018-12-04 09:27:37 UTC
Created polkit tracking bugs for this issue:

Affects: fedora-all [bug 1655926]

Comment 8 Shawn Wells 2018-12-06 19:19:02 UTC
Bump. Any update on getting this patched? 

Currently this bug allows non-privileged users to escalate to root.

Comment 12 Doran Moppert 2019-01-02 01:59:58 UTC
Statement:

This issue affects the versions of polkit as shipped with Red Hat Enterprise Linux 6 and 7.

Red Hat Enterprise Linux 6 is now in Maintenance Support 2 Phase of the support and maintenance life cycle. This has been rated as having a security impact of Moderate, and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

This issue affects the versions of polkit as shipped with Red Hat Virtualization 4. System users beyond those created at installation time are typically not used in Red Hat Virtualization Hypervisor or Management Appliance hosts, nor is there any opportunity to accidentally or maliciously create a user with a dangerous uid/gid on these systems under normal operation. For Red Hat Virtualization, this vulnerability has been rated as having a security impact of Low. Future updates may address this issue.

Comment 17 errata-xmlrpc 2019-08-06 12:07:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:2046 https://access.redhat.com/errata/RHSA-2019:2046

Comment 18 Product Security DevOps Team 2019-08-06 19:20:18 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2018-19788

Comment 21 errata-xmlrpc 2019-10-29 14:03:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.6 Extended Update Support

Via RHSA-2019:3232 https://access.redhat.com/errata/RHSA-2019:3232

Comment 22 Stefan Cornelius 2019-12-10 14:42:46 UTC
Mitigation:

Do not allow negative UIDs or UIDs greater than 2147483647.