mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 09:00:52 +07:00
CRED: Must initialise the new creds in prepare_kernel_cred()
The newly allocated creds in prepare_kernel_cred() must be initialised before get_uid() and get_group_info() can access them. They should be copied from the old credentials. Reported-by: Steve Dickson <steved@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0de3368141
commit
43529c9712
@ -506,6 +506,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
|
||||
else
|
||||
old = get_cred(&init_cred);
|
||||
|
||||
*new = *old;
|
||||
get_uid(new->user);
|
||||
get_group_info(new->group_info);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user