mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
SECURITY: selinux, fix update_rlimit_cpu parameter
commit 17740d8978 upstream.
Don't pass current RLIMIT_RTTIME to update_rlimit_cpu() in
selinux_bprm_committing_creds, since update_rlimit_cpu expects
RLIMIT_CPU limit.
Use proper rlim[RLIMIT_CPU].rlim_cur instead to fix that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@parisplace.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
80569f607b
commit
6db6aced4d
@@ -2366,7 +2366,7 @@ static void selinux_bprm_committing_creds(struct linux_binprm *bprm)
|
||||
initrlim = init_task.signal->rlim + i;
|
||||
rlim->rlim_cur = min(rlim->rlim_max, initrlim->rlim_cur);
|
||||
}
|
||||
update_rlimit_cpu(rlim->rlim_cur);
|
||||
update_rlimit_cpu(current->signal->rlim[RLIMIT_CPU].rlim_cur);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user