mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
audit: drop BUG_ON() from audit_signal_info_syscall()
The BUG_ON(axp->pid_count >= AUDIT_AUX_PIDS) check in audit_signal_info_syscall() will panic the kernel if the signal target pid array overflows, which is too severe for this situation. Replace it with a WARN_ON_ONCE() and return of -EINVAL, instead. Signed-off-by: Ricardo Robaina <rrobaina@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
committed by
Paul Moore
parent
76f7e9ddee
commit
5abf1b281d
+2
-1
@@ -2712,7 +2712,8 @@ int audit_signal_info_syscall(struct task_struct *t)
|
||||
axp->d.next = ctx->aux_pids;
|
||||
ctx->aux_pids = (void *)axp;
|
||||
}
|
||||
BUG_ON(axp->pid_count >= AUDIT_AUX_PIDS);
|
||||
if (WARN_ON_ONCE(axp->pid_count >= AUDIT_AUX_PIDS))
|
||||
return -EINVAL;
|
||||
|
||||
axp->target_pid[axp->pid_count] = task_tgid_nr(t);
|
||||
axp->target_auid[axp->pid_count] = audit_get_loginuid(t);
|
||||
|
||||
Reference in New Issue
Block a user