Bug 1190824 - Pulp logs the length of the database password at debug level
Summary: Pulp logs the length of the database password at debug level
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: 2.6 Beta
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: 2.6.0
Assignee: Randy Barlow
QA Contact: Irina Gulina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-09 16:52 UTC by Randy Barlow
Modified: 2015-02-28 23:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 23:23:12 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 691 0 None None None Never

Description Randy Barlow 2015-02-09 16:52:03 UTC
Description of problem:
Pulp logs the database connection parameters at the debug level, substituting each character of the database password with an asterisk. An attacker could learn the length of the database password by counting the asterisks. We should instead use a static string in this field.

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

How reproducible:
Every time

Steps to Reproduce:
1. Configure Pulp to use the DEBUG log level
2. Ensure that your syslog shows DEBUG messages.
3. Configure Pulp to use a username/password on the Mongo connection. (It is probably not important to actually configure Mongo to do this for this test.)
4. Watch the log when you start Pulp.

Actual results:
In the log, you will see the DB connection params logged, and the password will be transformed to asterisks, with one asterisk per character of your password. You can try varying the password to confirm this.

Expected results:
The log should not include hints about the length of the password.

Comment 1 Randy Barlow 2015-02-09 22:36:41 UTC
https://github.com/pulp/pulp/pull/1616

Comment 2 Chris Duryee 2015-02-10 22:32:57 UTC
2.6.0-0.7.beta

Comment 3 Irina Gulina 2015-02-19 17:51:02 UTC
Verified with https://bugzilla.redhat.com/show_bug.cgi?id=1182279#c5

Comment 4 Brian Bouterse 2015-02-28 23:23:12 UTC
Moved to https://pulp.plan.io/issues/691


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