Skip to content

Commit 1821df0

Browse files
Roberto SassuTyler Hicks
authored andcommitted
eCryptfs: ecryptfs_keyring_auth_tok_for_sig() bug fix
The pointer '(*auth_tok_key)' is set to NULL in case request_key() fails, in order to prevent its use by functions calling ecryptfs_keyring_auth_tok_for_sig(). Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Cc: <stable@kernel.org> Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
1 parent 50f198a commit 1821df0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎fs/ecryptfs/keystore.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,7 @@ int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key,
15631563
printk(KERN_ERR "Could not find key with description: [%s]\n",
15641564
sig);
15651565
rc = process_request_key_err(PTR_ERR(*auth_tok_key));
1566+
(*auth_tok_key) = NULL;
15661567
goto out;
15671568
}
15681569
(*auth_tok) = ecryptfs_get_key_payload_data(*auth_tok_key);

0 commit comments

Comments
 (0)