[Openstack-security] [Bug 1175905] Re: passlib failure to sanitize env variables PASSLIB_MAX_PASSWORD_SIZE

Grant Murphy gmurphy at redhat.com
Mon Mar 31 04:23:23 UTC 2014


So passlib defines the maximum password size as -

MAX_PASSWORD_SIZE = int(os.environ.get("PASSLIB_MAX_PASSWORD_SIZE") or
4096)

In this situation -

import passlib.utils
if CONF.identity.max_password_length > passlib.utils.MAX_PASSWORD_SIZE: 
   # we might have problems. 


One potential alternative to the proposed fix is to explicitly set the PASSLIB_MAX_PASSWORD_SIZE to the size defined in the configuration file. This would also act as a failsafe for any cases where max password length checks were missed.

-- 
You received this bug notification because you are a member of OpenStack
Security Group, which is subscribed to OpenStack.
https://bugs.launchpad.net/bugs/1175905

Title:
  passlib failure to sanitize env variables PASSLIB_MAX_PASSWORD_SIZE

Status in OpenStack Identity (Keystone):
  Confirmed

Bug description:
  Grant Murphy originally reported:

  * Usage of passlib

    The keystone server does not appear to sanitize the environment when 
    starting. This means that an unintended value can be set for 
    PASSLIB_MAX_PASSWORD_SIZE. Which will overwrite the default value of 
    4096 and potentially cause an unhandled passlib.exc.PasswordSizeError.  
    We should ensure sensible defaults are applied here prior to loading passlib.

  If this is exploitable it will need a CVE, if not we should still
  harden it so it can't be monkeyed with in the future.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1175905/+subscriptions




More information about the Openstack-security mailing list