Bug 2033697

Summary: Secret information may be leaked in Vdsm logs
Product: [oVirt] vdsm Reporter: Milan Zamazal <mzamazal>
Component: GeneralAssignee: Milan Zamazal <mzamazal>
Status: CLOSED CURRENTRELEASE QA Contact: Polina <pagranat>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.40.100.1CC: ahadas, bugs, pagranat, snikolov
Target Milestone: ovirt-4.5.0Keywords: CodeChange, ZStream
Target Release: 4.50.0.4Flags: sbonazzo: ovirt-4.5+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.50.0.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-08 10:27:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2039251    

Description Milan Zamazal 2021-12-17 16:29:03 UTC
Description of problem:

Current implementation of logging and hiding secret values in the logs allows a race that can result in logging the actual secret value instead of the asterisks placeholder. Code like the following

  log.info("Data: %s", protected_secret_value)
  plain = unprotect_passwords(protected_secret_value)

can result in the plain value occurring in the logs although a wrapped value is passed to the logger. 

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

4.50, probably present since 4.30.1.

How reproducible:

There is currently no known reproducer.

Comment 1 Polina 2022-05-04 07:55:59 UTC
File /usr/lib/python3.6/site-packages/vdsm/common/password.py with the presented by https://gerrit.ovirt.org/c/vdsm/+/118025/ change  is part of the version ovirt-engine-4.5.0.5-0.7.el8ev.noarch, vdsm-4.50.0.13-1.el8ev.x86_64

Comment 2 Arik 2022-05-08 10:27:53 UTC
We haven't noticed leaks of secrets with the fix