Bug 1197279 - (CVE-2022-24302) VUL-0: CVE-2022-24302: python27-paramiko,python-paramiko: race condition (between creation and chmod) in the write_private_key_file function could allow unauthorized information disclosure
(CVE-2022-24302)
VUL-0: CVE-2022-24302: python27-paramiko,python-paramiko: race condition (bet...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/326621/
CVSSv3.1:SUSE:CVE-2022-24302:6.2:(AV:...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-18 10:09 UTC by Thomas Leroy
Modified: 2022-11-17 16:12 UTC (History)
8 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Leroy 2022-03-18 10:09:20 UTC
CVE-2022-24302

In Paramiko before 2.10.1, a race condition (between creation and chmod) in the
write_private_key_file function could allow unauthorized information disclosure.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-24302
http://www.cvedetails.com/cve/CVE-2022-24302/
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24302
https://github.com/paramiko/paramiko/blob/363a28d94cada17f012c1604a3c99c71a2bda003/paramiko/pkey.py#L546
https://www.paramiko.org/changelog.html
Comment 1 Thomas Leroy 2022-03-18 10:26:53 UTC
There is indeed a window where the file where the private key is written is world readable. This should be exploitable only by a local user, or anybody having an arbitrary file read on the system.

Upstream fix:
https://github.com/paramiko/paramiko/commit/4c491e299c9b800358b16fa4886d8d94f45abe2e

This commit could also be needed:
https://github.com/paramiko/paramiko/commit/76b781754bfefe21706762442c422bac523701e4

Shouled be impacted:
- SUSE:SLE-12-SP1:Update/python-paramiko
- SUSE:SLE-12-SP3:Update:Products:Cloud8:Update/python-paramiko
- SUSE:SLE-12-SP4:Update:Products:Cloud9:Update/python-paramiko
- SUSE:SLE-15:Update/python-paramiko
- SUSE:SLE-15-SP1:Update/python-paramiko
Comment 6 Christian Almeida de Oliveira 2022-03-30 16:02:10 UTC
patches for SOC products accepted, back to Security team.
Comment 7 Gianluca Gabrielli 2022-03-31 10:47:22 UTC
@steven could you please submit to the missing codestreams? (comment 1)

- SUSE:SLE-12-SP1:Update/python-paramiko
- SUSE:SLE-15:Update/python-paramiko
- SUSE:SLE-15-SP1:Update/python-paramiko
Comment 8 Victor Zhestkov 2022-04-01 07:44:25 UTC
SR with the update for the Salt Bundle was created: https://build.opensuse.org/request/show/966178
Comment 10 Swamp Workflow Management 2022-04-28 13:24:21 UTC
SUSE-SU-2022:1446-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 1197279
CVE References: CVE-2022-24302
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    python-paramiko-2.4.2-150100.6.12.1
openSUSE Leap 15.3 (src):    python-paramiko-2.4.2-150100.6.12.1
SUSE Linux Enterprise Realtime Extension 15-SP2 (src):    python-paramiko-2.4.2-150100.6.12.1
SUSE Linux Enterprise Module for Python2 15-SP3 (src):    python-paramiko-2.4.2-150100.6.12.1
SUSE Linux Enterprise Module for Basesystem 15-SP4 (src):    python-paramiko-2.4.2-150100.6.12.1
SUSE Linux Enterprise Module for Basesystem 15-SP3 (src):    python-paramiko-2.4.2-150100.6.12.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Swamp Workflow Management 2022-04-28 13:26:56 UTC
SUSE-SU-2022:1447-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 1197279
CVE References: CVE-2022-24302
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for Public Cloud 12 (src):    python-paramiko-2.4.0-9.13.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 15 Swamp Workflow Management 2022-05-04 19:18:11 UTC
SUSE-SU-2022:1536-1: An update that fixes 8 vulnerabilities is now available.

Category: security (important)
Bug References: 1118088,1184177,1196249,1196877,1197279,1197417,1197637,1198556
CVE References: CVE-2018-19787,CVE-2021-28957,CVE-2022-0778,CVE-2022-22934,CVE-2022-22935,CVE-2022-22936,CVE-2022-22941,CVE-2022-24302
JIRA References: 
Sources used:
SUSE Manager Tools 12-BETA (src):    venv-salt-minion-3004-3.9.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 16 Hu 2022-08-16 12:25:48 UTC
done