Logs.var.log.mysql.error.log.txt contains usernames and passwords
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mariadb-10.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Xenial |
Confirmed
|
Undecided
|
Unassigned | ||
mariadb-10.1 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
mariadb-5.5 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Undecided
|
Unassigned | ||
mysql-5.5 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Undecided
|
Unassigned | ||
mysql-5.6 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Trusty |
Invalid
|
Undecided
|
Unassigned | ||
mysql-5.7 (Ubuntu) |
Fix Released
|
High
|
Lars Tangvald | ||
Xenial |
Fix Released
|
High
|
Robie Basak |
Bug Description
MySQL has some logic for ensuring passwords aren't written to the logs, detailed at https:/
[Impact]
Ubuntu's bug reporting system will suggest uploading the error log to a bug report. This can lead to user credentials written in plain text in public bug reports.
[Test case]
(note/todo: I had a simpler test for this, but can't find the exact syntax for it)
* Add the following to the server config:
plugin-
validate-
and restart the server
* Log in and run GRANT ALL ON *.* TO 'user'@'localhost' IDENTIFIED BY '123';
* Observe statement failing because it doesn't follow password validation rules
* Run "ubuntu-bug mysql-server"
* Choose "View Report"
* Search for "123"
Expected behavior:
Password is scrambled or otherwise not written to the apport report
Actual behavior:
The entire failed grant statement is written to the apport report
[Regression Potential]
The fix replaces all lines in the log that contain any of the terms mentioned on the password-logging site, so it will rewrite more lines than strictly necessary, potentially making debugging harder.
[Original description]
Your automated bug reports are posting Logs.var.
information type: | Private Security → Public Security |
Changed in mysql-5.7 (Ubuntu): | |
assignee: | nobody → Lars Tangvald (lars-tangvald) |
importance: | Undecided → High |
status: | New → Triaged |
Changed in mysql-5.7 (Ubuntu): | |
milestone: | none → ubuntu-16.05 |
Changed in mysql-5.7 (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in mysql-5.7 (Ubuntu Xenial): | |
milestone: | none → xenial-updates |
milestone: | xenial-updates → ubuntu-16.04.1 |
description: | updated |
Changed in mysql-5.6 (Ubuntu Trusty): | |
status: | New → Invalid |
Changed in mariadb-10.0 (Ubuntu): | |
status: | New → Invalid |
Changed in mariadb-10.0 (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in mariadb-10.1 (Ubuntu): | |
status: | New → Confirmed |
Changed in mysql-5.5 (Ubuntu Trusty): | |
status: | New → Confirmed |
Changed in mariadb-5.5 (Ubuntu Trusty): | |
status: | New → Confirmed |
Thanks for the report; I found two instances in our bugs with the following messages:
[Warning] Did not write failed 'GRANT ALL PRIVILEGES ON `phpmyadmin`.* TO `phpmyadmin` @'localhost' IDENTIFIED BY 'password'' into binary log while granting/revoking privileges in databases. localhost identified by "password"' into binary log while granting/revoking privileges in databases.
[Warning] Did not write failed 'grant all privileges on wordpress.* to wordpressuser@
(I've replaced the passwords with "password".)
Are there other instances of passwords or usernames that go into this log?
Thanks