CWE
377 362 668
Advisory Published
CVE Published
CVE Published
Advisory Published
Updated

CVE-2020-1733: Race Condition

First published: Tue Feb 11 2020(Updated: )

A race condition flaw was found in Ansible Engine 2.7.17 and prior, 2.8.9 and prior, 2.9.6 and prior when running a playbook with an unprivileged become user. When Ansible needs to run a module with become user, the temporary directory is created in /var/tmp. This directory is created with "umask 77 && mkdir -p <dir>"; this operation does not fail if the directory already exists and is owned by another user. An attacker could take advantage to gain control of the become user as the target directory can be retrieved by iterating '/proc/<pid>/cmdline'.

Credit: secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
redhat/ansible<0:2.7.17-1.el7ae
0:2.7.17-1.el7ae
redhat/ansible<0:2.8.11-1.el7ae
0:2.8.11-1.el7ae
redhat/ansible<0:2.8.11-1.el8ae
0:2.8.11-1.el8ae
redhat/ansible<0:2.9.7-1.el7ae
0:2.9.7-1.el7ae
redhat/ansible<0:2.9.7-1.el8ae
0:2.9.7-1.el8ae
Redhat Ansible<=2.7.16
Redhat Ansible>=2.8.0<2.8.8
Redhat Ansible>=2.9.0<=2.9.5
Redhat Ansible Tower<=3.3.4
Redhat Ansible Tower>=3.3.5<=3.4.5
Redhat Ansible Tower>=3.5.0<=3.5.5
Redhat Ansible Tower>=3.6.0<=3.6.3
Redhat Cloudforms Management Engine=5.0
Redhat Openstack=13
Fedoraproject Fedora=30
Fedoraproject Fedora=31
Fedoraproject Fedora=32
Debian Debian Linux=8.0
Debian Debian Linux=10.0
debian/ansible
2.7.7+dfsg-1+deb10u1
2.7.7+dfsg-1+deb10u2
2.10.7+merged+base+2.10.8+dfsg-1
7.3.0+dfsg-1
7.7.0+dfsg-3
redhat/ansible-engine<2.7.17
2.7.17
redhat/ansible-engine<2.8.11
2.8.11
redhat/ansible-engine<2.9.7
2.9.7
pip/ansible>=2.9.0a1<2.9.7
2.9.7
pip/ansible>=2.8.0a1<2.8.11
2.8.11
pip/ansible>=0<2.7.17
2.7.17

Remedy

This issue can be mitigated by mounting the proc filesystem with hidepid=2 option (https://www.kernel.org/doc/Documentation/filesystems/proc.txt). This way only the user used by Ansible will be able to perform the attack as users on the system will be able to access only their processes /proc/$PID/ directories. Also note that mounting proc filesystem with hidepid=2 might require re-mounting it on unpatched kernels, due to a kernel bug (see https://unix.stackexchange.com/questions/584054/why-procfs-mount-option-only-working-on-remount), there will be hidepid=3 in the future (https://patchwork.kernel.org/patch/11310217/).

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Parent vulnerabilities

(Appears in the following advisories)

Frequently Asked Questions

  • What is CVE-2020-1733?

    CVE-2020-1733 is a race condition vulnerability found in Ansible Engine when running a playbook with an unprivileged become user.

  • What is the severity of CVE-2020-1733?

    CVE-2020-1733 has a medium severity rating.

  • Which versions of Ansible Engine are affected by CVE-2020-1733?

    Ansible Engine 2.7.17 and prior, 2.8.9 and prior, and 2.9.6 and prior are affected by CVE-2020-1733.

  • How can I fix CVE-2020-1733?

    To fix CVE-2020-1733, update Ansible Engine to versions 2.7.17, 2.8.11, or 2.9.7.

  • Where can I find more information about CVE-2020-1733?

    You can find more information about CVE-2020-1733 on the Red Hat Bugzilla and GitHub pages.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203