Bug 2123767 - CVE-2022-3146 tripleo-ansible: /etc/openstack/clouds.yaml got 644 permission [openstack-16.2]
Summary: CVE-2022-3146 tripleo-ansible: /etc/openstack/clouds.yaml got 644 permission ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: tripleo-ansible
Version: 16.2 (Train)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: async
: 16.2 (Train on RHEL 8.4)
Assignee: Takashi Kajinami
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks: CVE-2022-3146 2124732
TreeView+ depends on / blocked
 
Reported: 2022-09-02 14:55 UTC by Maciej Relewicz
Modified: 2022-10-17 10:21 UTC (History)
10 users (show)

Fixed In Version: tripleo-ansible-0.8.1-2.20220406160116.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2124732 (view as bug list)
Environment:
Last Closed: 2022-10-17 10:20:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 854141 0 None stable/train: MERGED tripleo-ansible: tripleo-keystone-resources: reduce permissions for clouds.yaml (Ic463aa66b719bfc8f860662e8387f3eea6faaf... 2022-09-26 14:19:40 UTC
Red Hat Issue Tracker OSP-18536 0 None None None 2022-09-02 15:35:22 UTC
Red Hat Product Errata RHSA-2022:6969 0 None None None 2022-10-17 10:21:22 UTC

Description Maciej Relewicz 2022-09-02 14:55:48 UTC
Description of problem:

there is a file:
(undercloud) [stack@undercloud ~]$ ls -lah /etc/openstack/clouds.yaml
-rw-r--r--. 1 root root 582 Aug 22 11:41 /etc/openstack/clouds.yaml
which consists plaintext passwords to undercloud and overcloud clouds and it can be read by anyone.

it comes from
sudo grep -r tripleo_keystone_resources_clouds_file_path /usr/
/usr/share/ansible/roles/tripleo-keystone-resources/defaults/main.yml:tripleo_keystone_resources_clouds_file_path: /etc/openstack/clouds.yaml
/usr/share/ansible/roles/tripleo-keystone-resources/tasks/clouds.yml:- name: "Check if {{ tripleo_keystone_resources_clouds_file_path }} exists"
/usr/share/ansible/roles/tripleo-keystone-resources/tasks/clouds.yml:    path: "{{ tripleo_keystone_resources_clouds_file_path }}"
/usr/share/ansible/roles/tripleo-keystone-resources/tasks/clouds.yml:- name: "Create empty {{ tripleo_keystone_resources_clouds_file_path }} if it does not exist"
/usr/share/ansible/roles/tripleo-keystone-resources/tasks/clouds.yml:    dest: "{{ tripleo_keystone_resources_clouds_file_path }}"
/usr/share/ansible/roles/tripleo-keystone-resources/tasks/clouds.yml:- name: "Configure {{ tripleo_keystone_resources_clouds_file_path }}"
/usr/share/ansible/roles/tripleo-keystone-resources/tasks/clouds.yml:    tripleo_config_dest: "{{ tripleo_keystone_resources_clouds_file_path }}"
/usr/share/ansible/roles/tripleo-keystone-resources/tasks/clouds.yml:    tripleo_config_src: "{{ tripleo_keystone_resources_clouds_file_path }}"

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Brendan Shephard 2022-09-04 21:50:47 UTC
This fix for this one was merged 12 days ago:
https://github.com/openstack/tripleo-ansible/commit/97f363ce2eba9942efc443f3bedb454babc3c38e

So that patch will be available in a upcoming z-stream

Comment 3 Nick Tait 2022-09-06 23:01:19 UTC
Please use CVE-2022-3146 to track this vulnerability.

Comment 4 Nick Tait 2022-09-20 21:42:03 UTC
Maciej, would you like to be credited on the CVE page (https://access.redhat.com/security/cve/CVE-2022-3146) as discovering this security issue?

Comment 5 Maciej Relewicz 2022-09-21 15:35:23 UTC
yes, sure.

Comment 8 David Rosenfeld 2022-10-06 14:48:22 UTC
File permission was changed as expected:

[stack@undercloud-0 ~]$ ls -lah /etc/openstack/clouds.yaml
-rw-------. 1 root root 595 Oct  6 13:45 /etc/openstack/clouds.yaml

Comment 10 errata-xmlrpc 2022-10-17 10:20:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat OpenStack Platform (tripleo-ansible) security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:6969


Note You need to log in before you can comment on or make changes to this bug.