func: int CVE_2013_1792_VULN_install_user_keyrings(void) struct user_struct * user ; const struct cred * cred ; struct key * uid_keyring , * session_keyring ; char buf [ 20 ] ; uid_t uid ; cred = current_cred ( ); user = cred -> user; uid = from_kuid ( cred -> user_ns , user -> uid ); if ( user -> uid_keyring )  if ( ! user -> uid_keyring )  sprintf ( buf , "_uid.%u" , uid ); uid_keyring = find_keyring_by_name ( buf , true ); if ( IS_ERR ( uid_keyring ) )  uid_keyring = keyring_alloc ( buf , user -> uid , INVALID_GID , cred , KEY_ALLOC_IN_QUOTA , NULL ); if ( IS_ERR ( uid_keyring ) )  sprintf ( buf , "_uid_ses.%u" , uid ); session_keyring = find_keyring_by_name ( buf , true ); if ( IS_ERR ( session_keyring ) )  session_keyring = keyring_alloc ( buf , user -> uid , INVALID_GID , cred , KEY_ALLOC_IN_QUOTA , NULL ); if ( IS_ERR ( session_keyring ) )  ret = PTR_ERR ( session_keyring ); ret = key_link ( session_keyring , uid_keyring ); if ( ret < 0 )  user -> session_keyring = session_keyring; key_put ( session_keyring ); kleave ( " = %d" , ret ); return ret ; 