From b2fba2f38fb875a509184eac1c4b4ca9f0739d9e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 19 Jun 2004 19:56:58 -0700 Subject: Follow 2.4.x semantics for in-kernel signal sending. --- kernel/signal.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'kernel') diff --git a/kernel/signal.c b/kernel/signal.c index d41b3a0e8b7e..18048ca42f0e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1196,6 +1196,13 @@ send_sig_info(int sig, struct siginfo *info, struct task_struct *p) int ret; unsigned long flags; + /* + * Make sure legacy kernel users don't send in bad values + * (normal paths check this in check_kill_permission). + */ + if (sig < 0 || sig > _NSIG) + return -EINVAL; + /* * We need the tasklist lock even for the specific * thread case (when we don't need to follow the group -- cgit v1.2.3