Generic exceptions can reveal system information

Bug #1293113 reported by Leandro Ignacio Costantino
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
New
Undecided
Unassigned

Bug Description

Due to the nature of https://github.com/openstack/keystone/blob/master/keystone/common/wsgi.py#L378
generic exceptions are being thrown by the API that may expose internal system information.

Example as a regular user:
1) Keystone & mysql running
2) # keystone token-get
3) #service mysql stop
4) #keystone token-get ( or any other client that use keystone , ex: nova list)
Output:
ERROR: An unexpected error prevented the server from fulfilling your request. (OperationalError) (2003, "Can't connect to MySQL server on '127.0.0.1' (111)") None None (HTTP 500)

If the db password is not the right one:
Authorization Failed: An unexpected error prevented the server from fulfilling your request. (OperationalError) (1045, "Access denied for user 'root'@'localhost' (using password: YES)") None None (HTTP 500)

There are 3 possibles fix for this:
  - Catch specific exceptions that may reveal usernames / hosts
  - Replace exception=e for exception='' on line 379.
  - Check if user is admin or not to return the exception message in case that this really needed. ( i don't think this is appopiate neither, since an admin user maybe not the Cloud Admin operator? )

I will upload a review if we consider this a real bug.

Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

Duplicate of fixed released.

information type: Private Security → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.