Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 711974 (CVE-2020-10684, CVE-2020-10685, CVE-2020-1733, CVE-2020-1735, CVE-2020-1736, CVE-2020-1737, CVE-2020-1738, CVE-2020-1740, CVE-2020-1753) - <app-admin/ansible-2.9.7: Multiple vulnerabilities (CVE-2020-{1733,1737,1740,1738,1736,1735,1753,10684,10685})
Summary: <app-admin/ansible-2.9.7: Multiple vulnerabilities (CVE-2020-{1733,1737,1740,...
Status: RESOLVED FIXED
Alias: CVE-2020-10684, CVE-2020-10685, CVE-2020-1733, CVE-2020-1735, CVE-2020-1736, CVE-2020-1737, CVE-2020-1738, CVE-2020-1740, CVE-2020-1753
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Security
URL: https://github.com/ansible/ansible/is...
Whiteboard: B2 [glsa+ cve]
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-09 17:23 UTC by Sam James
Modified: 2020-06-13 01:50 UTC (History)
4 users (show)

See Also:
Package list:
=app-admin/ansible-2.9.7
Runtime testing required: ---
nattka: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-03-09 17:23:27 UTC
Description:
"A flaw was found in Ansible 2.7.17 and prior, 2.8.9 and prior, and 2.9.6 and prior when using the Extract-Zip function from the win_unzip module as the extracted file(s) are not checked if they belong to the destination folder. An attacker could take advantage of this flaw by crafting an archive anywhere in the file system, using a path traversal. This issue is fixed in 2.10."

Bug: https://github.com/ansible/ansible/issues/67795
PR: https://github.com/ansible/ansible/pull/67799
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-03-11 19:50:35 UTC
A new vulnerability has been disclosed.

2) CVE-2020-1733

Description:
"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'."

Bug: https://github.com/ansible/ansible/issues/67791

No patch yet available.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-03-16 16:53:51 UTC
3) CVE-2020-1740

Description:
"A flaw was found in Ansible Engine when using Ansible Vault for editing encrypted files. When a user executes "ansible-vault edit", another user on the same computer can read the old and new secret, as it is created in a temporary file with mkstemp and the returned file descriptor is closed and the method write_data is called to write the existing secret in the file. This method will delete the file before recreating it insecurely. All versions in 2.7.x, 2.8.x and 2.9.x branches are believed to be vulnerable."

Bug: https://github.com/ansible/ansible/issues/67798

4) CVE-2020-1738

Description:
"A flaw was found in Ansible Engine when the module package or service is used and the parameter 'use' is not specified. If a previous task is executed with a malicious user, the module sent can be selected by the attacker using the ansible facts file. All versions in 2.7.x, 2.8.x and 2.9.x branches are believed to be vulnerable."

Bug: https://github.com/ansible/ansible/issues/67796

5) CVE-2020-1736

Description:
"A flaw was found in Ansible Engine when a file is moved using atomic_move primitive as the file mode cannot be specified. This sets the destination files world-readable if the destination file does not exist and if the file exists, the file could be changed to have less restrictive permissions before the move. This could lead to the disclosure of sensitive data. All versions in 2.7.x, 2.8.x and 2.9.x branches are believed to be vulnerable."

Bug: https://github.com/ansible/ansible/issues/67794

6) CVE-2020-1735

Description:
"A flaw was found in the Ansible Engine when the fetch module is used. An attacker could intercept the module, inject a new path, and then choose a new destination path on the controller node. All versions in 2.7.x, 2.8.x and 2.9.x branches are believed to be vulnerable."

Bug: https://github.com/ansible/ansible/issues/67793
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-03-24 15:12:28 UTC
7) CVE-2020-10684

Description:
"A flaw was found in Ansible Engine, all versions 2.7.x, 2.8.x and 2.9.x prior to 2.7.17, 2.8.9 and 2.9.6 respectively, when using ansible_facts as a subkey of itself and promoting it to a variable when inject is enabled, overwriting the ansible_facts after the clean. An attacker could take advantage of this by altering the ansible_facts, such as ansible_hosts, users and any other key data which would lead into privilege escalation or code injection."

PR: https://github.com/ansible/ansible/pull/68431
Patch: https://github.com/ansible/ansible/pull/68431/commits/e26374d30ced2585e6f10a2488a54ad23a115f8b
Comment 4 GLSAMaker/CVETool Bot gentoo-dev 2020-04-22 00:58:33 UTC
CVE-2020-1737 (https://nvd.nist.gov/vuln/detail/CVE-2020-1737):
  A flaw was found in Ansible 2.7.17 and prior, 2.8.9 and prior, and 2.9.6 and
  prior when using the Extract-Zip function from the win_unzip module as the
  extracted file(s) are not checked if they belong to the destination folder.
  An attacker could take advantage of this flaw by crafting an archive
  anywhere in the file system, using a path traversal. This issue is fixed in
  2.10.

CVE-2020-1733 (https://nvd.nist.gov/vuln/detail/CVE-2020-1733):
  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'.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-04-22 16:47:51 UTC
@maintainer(s), please advise if ready for stabilisation of 2.0.7 or call yourself.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-04 09:43:13 UTC
@maintainer(s): ping
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-05 22:29:40 UTC
stable acked by prometheanfire
Comment 8 Agostino Sarubbo gentoo-dev 2020-05-06 14:23:50 UTC
amd64 stable
Comment 9 Agostino Sarubbo gentoo-dev 2020-05-11 16:50:10 UTC
x86 stable.

Maintainer(s), please cleanup.
Security, please vote.
Comment 10 GLSAMaker/CVETool Bot gentoo-dev 2020-05-12 03:02:39 UTC
CVE-2020-1753 (https://nvd.nist.gov/vuln/detail/CVE-2020-1753):
  A security flaw was found in Ansible Engine, all Ansible 2.7.x versions
  prior to 2.7.17, all Ansible 2.8.x versions prior to 2.8.11 and all Ansible
  2.9.x versions prior to 2.9.7, when managing kubernetes using the k8s
  module. Sensitive parameters such as passwords and tokens are passed to
  kubectl from the command line, not using an environment variable or an input
  configuration file. This will disclose passwords and tokens from process
  list and no_log directive from debug module would not have any effect making
  these secrets being disclosed on stdout and log files.

CVE-2020-10685 (https://nvd.nist.gov/vuln/detail/CVE-2020-10685):
  A flaw was found in Ansible Engine affecting Ansible Engine versions 2.7.x
  before 2.7.17 and 2.8.x before 2.8.11 and 2.9.x before 2.9.7 as well as
  Ansible Tower before and including versions 3.4.5 and 3.5.5 and 3.6.3 when
  using modules which decrypts vault files such as assemble, script,
  unarchive, win_copy, aws_s3 or copy modules. The temporary directory is
  created in /tmp leaves the s ts unencrypted. On Operating Systems which /tmp
  is not a tmpfs but part of the root partition, the directory is only cleared
  on boot and the decryp emains when the host is switched off. The system will
  be vulnerable when the system is not running. So decrypted data must be
  cleared as soon as possible and the data which normally is encrypted ble.
Comment 11 Larry the Git Cow gentoo-dev 2020-05-12 09:05:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e731d4e062f6f5da0810cfbf5d97165f2615411

commit 3e731d4e062f6f5da0810cfbf5d97165f2615411
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2020-05-12 09:05:25 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2020-05-12 09:05:30 +0000

    app-admin/ansible: remove vulnerable version.
    
    Bug: https://bugs.gentoo.org/711974
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Patrice Clement <monsieurp@gentoo.org>

 app-admin/ansible/Manifest             |  1 -
 app-admin/ansible/ansible-2.9.6.ebuild | 68 ----------------------------------
 2 files changed, 69 deletions(-)
Comment 12 GLSAMaker/CVETool Bot gentoo-dev 2020-06-13 01:50:13 UTC
This issue was resolved and addressed in
 GLSA 202006-11 at https://security.gentoo.org/glsa/202006-11
by GLSA coordinator Aaron Bauman (b-man).