Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set cred->user_ns in key_replace_session_keyring
Since this cred was not created with copy_creds(), it needs to get initialized. Otherwise use of syscall(__NR_keyctl, KEYCTL_SESSION_TO_PARENT); can lead to a NULL deref. Thanks to Robert for finding this. But introduced by commit 47a150e ("Cache user_ns in struct cred"). Signed-off-by: Serge E. Hallyn <[email protected]> Reported-by: Robert Święcki <[email protected]> Cc: David Howells <[email protected]> Cc: [email protected] (2.6.39) Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information