Bug 1778309 (CVE-2019-18276)
Summary: | CVE-2019-18276 bash: when effective UID is not equal to its real UID the saved UID is not dropped | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Guilherme de Almeida Suckevicz <gsuckevi> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | unspecified | CC: | admiller, kasal, kdudka, mcascell, svashisht, 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: |
A privilege escalation vulnerability was found in bash in the way it dropped privileges when started with an effective user id not equal to the real user id. Bash may be vulnerable to this flaw if the setuid permission is set and the owner of the bash program itself is a non-root user. A local attacker could exploit this flaw to escalate their privileges on the system.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2021-05-18 14:33:52 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: | 1778310, 1793942, 1793943, 1972185, 1972186 | ||
Bug Blocks: | 1778311 |
Description
Guilherme de Almeida Suckevicz
2019-11-29 20:08:38 UTC
Created bash tracking bugs for this issue: Affects: fedora-all [bug 1778310] The setuid() function has different behaviors depending weather it is running as root or not. In the former case (running as root) it sets all three UIDs (effective UID, real UID and saved UID), whereas in the latter case (running as non-root) it only sets the effective UID. It is worth noting that Bash is affected by this flaw only when running as non-root user; this lowers the exposure of the vulnerability. Also note that in order to exploit this flaw, the bash process has to call setuid() without exec()-ing any other process as in this case the saved UID would be lost. Hence the need of the bash builtin feature mentioned above. If the shell is started with the effective UID not equal to the real UID, and the -p option is not supplied, function disable_priv_mode() attempts to drop privileges by calling setuid(). However, as discussed in Comment 2, setuid() may fail to set the saved UID. Upstream patch simply replaces this call with setresuid(), thus making sure the saved UID is also set appropriately: https://git.savannah.gnu.org/cgit/bash.git/diff/shell.c?h=devel&id=951bdaad7a18cc0dc1036bba86b18b90874d39ff This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2021:1679 https://access.redhat.com/errata/RHSA-2021:1679 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-2019-18276 |