mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Move where we audit the PID argument such that we unconditionally
audit it at the beginning of the syscall. This fixes a problem where the user supplies an invalid process ID which is > 0 which results in the PID argument not being audited. Obtained from: TrustedBSD Project MFC after: 1 week
This commit is contained in:
parent
088b56a874
commit
5ff3816d82
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172916
@ -1693,6 +1693,7 @@ kill(td, uap)
|
||||
int error;
|
||||
|
||||
AUDIT_ARG(signum, uap->signum);
|
||||
AUDIT_ARG(pid, uap->pid);
|
||||
if ((u_int)uap->signum > _SIG_MAXSIG)
|
||||
return (EINVAL);
|
||||
|
||||
@ -1709,7 +1710,6 @@ kill(td, uap)
|
||||
PROC_UNLOCK(p);
|
||||
return (error);
|
||||
}
|
||||
AUDIT_ARG(pid, uap->pid);
|
||||
switch (uap->pid) {
|
||||
case -1: /* broadcast signal */
|
||||
return (killpg1(td, uap->signum, 0, 1));
|
||||
|
Loading…
Reference in New Issue
Block a user