Commit Graph

715 Commits (stable-2.7)

Author SHA1 Message Date
Matt Clay b378a44ab3 New release v2.7.18 5 years ago
Abhijeet Kasurde 5c9599f5a9 [2.7] Docs: point inventory script to respective version
With collections migration, inventory scripts are moved from devel (2.10).
Point docs for inventory script to their respective version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Rick Elrod de9a4f5474 Fix incorrect CVE reference in changelog fragment
Change:
This corrects an incorrect CVE identifier in the changelog entry for
CVE-2020-1735.

Test Plan:
N/A

Tickets:
Refs #67793, #68720

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Rick Elrod a5c671da74 [stable-2.7] pip - Fix check_mode for prerelease packages (#68690)
* pip - Fix check_mode for prerelease packages

Fixes #68592.

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Matt Martz <matt@sivel.net>.
(cherry picked from commit 82c60db49b)

Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
Matt Clay f78a5b184c New release v2.7.17 5 years ago
Brian Coca 3c484831f8 fixed fetch traversal from slurp (#68720)
* fixed fetch traversal from slurp

  * ignore slurp result for dest
  * fixed naming when source is relative
  * fixed bug in local connection plugin
  * added tests with fake slurp
  * moved existing role tests into runme.sh
  * normalized on action excepts
  * moved dest transform down to when needed
  * added is_subpath check
  * fixed bug in local connection

fixes #67793

CVE-2019-3828

(cherry picked from commit ba87c225cd)
5 years ago
Brian Coca ef32a5bf96 safely use vault to edit secrets (#68644)
* when possible, use filedescriptors from mkstemp to avoid race
  * when using path strings, ensure we are always creating the file

CVE-2020-1740
Fixes #67798

Co-authored-by: samdoran
(cherry picked from commit 28f9fbdb5e)
5 years ago
Sloane Hertel edd1e1723c
[2.7] CVE-2020-1746 - Remove the params module option from ldap_attr and ldap_entry (#68716)
* Remove the params module option from ldap_attr and ldap_entry

Module options that circumvent Ansible's option handling were disallowed
in:
https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html

Additionally, this particular usage can be insecure if bind_pw is set
this way as the password could end up in a logfile or displayed on
stdout.

Fixes CVE-2020-1746

(cherry picked from commit 0ff609f1bc)

* Fix formatting for option names

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Fix fail_json

* update sanity

* fix indentation error

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
5 years ago
Brian Coca 1d0d2645ee
prevent ansible_facts injection (#68431) (#68446)
* prevent ansible_facts injection (#68431)

- also only replace when needed
 - switched from replace to index
 - added test to verify bogus_facts are not accepted

CVE-2020-10684

(cherry picked from commit a9d2ceafe4)

* add to ignore
5 years ago
Brian Coca 4e1fe80e68 fix vault temp file handling (#68433)
* fix vault tmpe file handling

 * use local temp dir instead of system temp
 * ensure each worker clears dataloader temp files
 * added test for dangling temp files
 * added notes to data loader

CVE-2020-10685

(cherry picked from commit 6452a82452)
5 years ago
Sloane Hertel 1a89d4f059
[2.7] CVE-2020-1739 - provide password securely for subversion module or warn (#68913)
* subversion module - provide password securely when possible or warn (#67829)

* subversion module - provide password securely with svn command line option --password-from-stdin when possible, and provide a warning otherwise.
* Update lib/ansible/modules/source_control/subversion.py.
* Add a test.

Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit d91658ec0c)

* Create the OUTPUT_DIR and make sure it is removed at the end

* fix sanity test
5 years ago
Sam Doran 8cccb33d71
[stable-2.7] win_unzip - normalize and compare paths to prevent path traversal (#67799) (#67938)
* win_unzip  - normalize and compare paths to prevent path traversal (#67799)

* Actually inspect the paths and prevent escape
* Add integration tests
* Generate zip files for use in integration test
* Adjust error message

(cherry picked from commit d30c57ab22)

* Fix tests for 2.7
5 years ago
Brian Coca ecf99d5e1f
avoid mkdir -p (#68921) (#68928)
* avoid mkdir -p (#68921)

* also consolidated temp dir name generation, added pid for more 'uniqness'
* generalize error message
* added notes about remote expansion

CVE-2020-1733
fixes #67791

(cherry picked from commit 8077d8e401)

* C

* Update lib/ansible/plugins/shell/__init__.py

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>

* adjusted for missing api

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Clay c59d722d98 [stable-2.7] Update tests to use RHEL 7.8. (#68787)
* Update tests to use RHEL 7.8.

Keeping support for RHEL 7.6 since collections are still using it.

* Fix tests for RHEL 7.7+ due to extras repo name change..
(cherry picked from commit 04edd77c42)

Co-authored-by: Matt Clay <mclay@redhat.com>
5 years ago
Rick Elrod 3d8d43bd4c
OpenSUSE15.1 container image + necessary test changes (2.7 edition) (#68801)
* add changelog fragment

Signed-off-by: Rick Elrod <rick@elrod.me>

* Update changelogs/fragments/ansible-test-opensuse-15.1.yml

Co-Authored-By: Matt Clay <matt@mystile.com>

* handle installing mysql on suse

Signed-off-by: Rick Elrod <rick@elrod.me>

* attempt to get tests passing again

Signed-off-by: Rick Elrod <rick@elrod.me>

* Update docker.txt to use the OpenSUSE 15.1 container image

Signed-off-by: Rick Elrod <rick@elrod.me>

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Sam Doran 3bc7796035 [stable-2.7] ansible-test - add constraint for virtualenv (#67289)
* ansible-test - add constraint for virtualenv

* Limit virtualenv only on macOS.

Co-authored-by: Matt Clay <matt@mystile.com>.
(cherry picked from commit 8f296a6533)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Matt Clay 9f60b16d31 [stable-2.7] Add constraints for Jinja2 on Python 2.6. (#66826)
* Add constraint for Jinja2 on Python 2.6.

* Fix constraint in inventory_aws_conformance test.

* Add constrraints for template_jinja2_latest test..
(cherry picked from commit 965854fbd2)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Davis 8fd406ee8e New release v2.7.16 5 years ago
Matt Clay 7c7d334006 [stable-2.7] Ignore warnings in ansible-test environment check.
(cherry picked from commit 3db1ac4f56)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 2b57127c64 [stable-2.7] Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container..
(cherry picked from commit 51e5b714e0)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay dfb425bed5 [stable-2.7] Add ansible-test constraint to avoid coverage 5.0+.
(cherry picked from commit 9ea5b539b6)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Ganesh Nalawade 88416b627c Fix nxos_file_copy option value path validation (#65423) (#65848)
* Fix nxos_file_copy option value path validation

*  Modify `local_file`, `local_file_directory` and
   `remote_file` option type from `str` to `path`
   so that the option value is validated in Ansible
   for a legitimate path value

* Fix review comments

(cherry picked from commit 88008badb1)
5 years ago
Abhijeet Kasurde 6a86650109 [2.7] solaris_zone: Allow only valid characters in zone name
CVE-2019-14904 - solaris_zone module accepts zone name and performs actions related to that.
However, there is no user input validation done while performing actions.
A malicious user could provide a crafted zone name which allows executing commands
into the server manipulating the module behaviour.

Adding user input validation as per Solaris Zone documentation fixes this issue.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Davis 0623dedf2d New release v2.7.15 5 years ago
Matt Davis 75288a89d0
Callback: removing args from task_fields from Sumologic and Splunk plugin(#63527) (#64748)
CVE-2019-14864 Ansible: Splunk and Sumologic callback plugins leak sensitive data in logs

Fixes #63522

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit c76e074e4c)
5 years ago
Toshio Kuratomi 71affa9d7c New release v2.7.14 5 years ago
Sam Doran 0fd656e996 [stable-2.7] Properly mask no_log values is sub parameters during failure (#63405)
(cherry picked from commit 156330b485)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Matt Martz 40618d70e6 [stable-2.7] Wrap CLI passwords as AnsibleUnsafeText (#63352) (#63392)
* [stable-2.7] Wrap CLI passwords as AnsibleUnsafeText (#63352)

* isa string should rewrap as unsafe in get_validated_value

* _is_unsafe shouldn't be concerned with underlying types

* Start with passwords as text, instead of bytes

* Remove unused imports

* Add changelog fragment

* Update changelog with CVE.
(cherry picked from commit baeff7462d)

Co-authored-by: Matt Martz <matt@sivel.net>

* Update tests
5 years ago
Toshio Kuratomi 90e74dd260 Fix for plugins which used the boto libraries leaking the boto credentials to logs
(cherry picked from commit 3753304d20)

https://github.com/ansible/ansible/pull/63366
5 years ago
Dag Wieers c2f528b768 Fix whitespace issue in filter (backport 2.7)
This fixes reported issue #60276

This is a backport of #62768
5 years ago
Matt Clay dec03d06c8 [stable-2.7] Redact sensitive values by default in ansible-test.
(cherry picked from commit 0631e057e9)

Co-authored-by: Matt Clay <matt@mystile.com>.
5 years ago
Toshio Kuratomi 24007b5d4b New release v2.7.13 5 years ago
Brian Coca d728127310 prevent templating of passwords from prompt (#59246) (#59553)
* prevent templating of passwords from prompt (#59246)

* prevent templating of passwords from prompt

  fixes CVE-2019-10206

(cherry picked from commit e9a37f8e31)

* Improve performane of UnsafeProxy __new__

This adds an early return to the __new__ method of the UnsafeProxy object
which avoids creating the unsafe object if the incoming object is already
unsafe.

(cherry picked from commit c1e23c22a9)
(cherry picked from commit 490f17c7f9)
5 years ago
Toshio Kuratomi 1fb35cd857 New release v2.7.12 5 years ago
Brian Coca a11c3edfa4 safe_eval fix (#57188)
* just dont pass locals

 - also fix globals
 - added tests

* fixed tests

(cherry picked from commit b9b0b23015)
6 years ago
Toshio Kuratomi a25e32f247 New release v2.7.11 6 years ago
Bill Dodd 61643874f2 Expose timeout option to Redfish modules
(cherry picked from commit d8536e47d3)
6 years ago
Nilashish Chakraborty aa616b436c Fix VyOS cli prompt issues (#56389)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 30ccc8e1bd)

Add changelog for vyos prompt fix
6 years ago
Sumit Jaiswal 85b21c2c9b Backport PR for fixing NIOS_ZONE module idempotency (#56346)
* To fix the issue where nios_zone module was running second time for same object (#55595)

* fix for 55128 issue

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* review comment fix

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 661f7be0fe)

* changelog for 2.7 backport

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* changelog for 2.7 backport

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* shippable fix

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
6 years ago
Lars Kellogg-Stedman a8e14cfe1f connection/docker: add privilege escalation support
As described in #53385 (and #31759), the docker connection driver did
not support privilege escalation. This commit is a shameless
cut-and-paste of the privilege escalation support from the `local`
connection plugin into the `docker` plugin.

This is a backport to stable-2.7 of #55816.
6 years ago
Strahinja Kustudic 6bc671a46a Backport/2.7/55695 (#56253)
* sysctl will now return an error if the value is invalid

sysctl can fail to set a value even if it returns an exit status 0. More
details: https://bugzilla.redhat.com/show_bug.cgi?id=1264080. Because of
this in case of an invalid value or a read-only file system, sysctl
module would return OK, even though it didn't set anything. To be sure
that sysctl correctly applied the changes we also need to check the
output of stderr.

(cherry picked from commit 0432b7f252)

* Run sysctl with LANG=C

Because we are parsing sysctl stderr we need to make sure that errors
are persistent across different system language settings.

(cherry picked from commit a16128f778)

* Add changelog fragment for sysctl

(cherry picked from commit 3ad9d4d83c)
6 years ago
Felix Fontein d9d5cca69e oom_killer and oom_score_adj are available since docker-py 1.8.0. (#56012)
* oom_killer and oom_score_adj are available since docker-py 1.8.0.

* Add changelog.

(cherry picked from commit f692261ea0)
6 years ago
Felix Fontein 5daef29e4d docker_container: use restart() API function instead of stop/start sequence (#55894)
* Improve container restart.

* Adjust tests.

* Add changelog.

* Quote options.

* Move tests for restart/recreate options to start/stop tests.

* Fix changelog name.

(cherry picked from commit 95d1564f70)
6 years ago
Jordan Borean 3db80f68f7 win_acl - fix network path qualifier parsing (#55970)
(cherry picked from commit cc3b8b9f72)
6 years ago
Sam Doran b394d309f1 [stable-2.7] User - Fix shadow file parsing on AIX (#55230)
Implement a new method for shadow file parsing so it can be subclassed..
(cherry picked from commit f27eccabbd)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
René Moser 8a8c9ed089 vultr_server: fix idempotency for private network and IPv6 options (#55619)
* vultr_server: fix idempotency for private network and IPv6 options

* add changelog

(partly cherry picked from commit 1705ef5f26)
6 years ago
Hannes Ljungberg 6f3b0e7177 [2.7] docker_swarm_service: Pass correct types on secrets/configs gid,uid,mode (#55617)
* Pass correct types on secrets/configs gid,uid,mode

* Add changelog fragment

* Fix idempotency
6 years ago
Nathaniel Case f31374914f [stable-2.7] Move missing library abort to use rather than import (#55648)
* [stable-2.7] Move missing library abort to use rather than import for netconf (#55384).
(cherry picked from commit b442706b54)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>

* Add changelog

* missing_required_lib not in 2.7
6 years ago
Robert Osowiecki 9aa9c11a1a vsphere_guest: corrected fix #19716 misbehaviour (#55285)
* creating machines without vm_extra_config is possible
* power state operation on absent machines will fail

(cherry picked from commit 93758a5141)
6 years ago
Felix Fontein ed1640e9dc [2.7] docker_container: fix support for docker-py 1.7.0 (#55496)
* In theory, some 2.7 modules support docker-py 1.7.0.

* Add changelog.
6 years ago