Re: 2.6.7 Oops in signal handling with ptrace

From: Andrew Morton
Date: Mon Jun 21 2004 - 00:16:29 EST


Joris van Rantwijk <joris@xxxxxxxxxx> wrote:
>
> Linux 2.6.7 (and 2.6.6) gives an Oops in specific situations
> related to signal handling and ptracing. The Oops is triggered when
> a process which is being ptraced with TRACESYSGOOD, receives signals
> in a very specific pattern. This Oops is perfectly reproducable.

Joris, Linus has merged a patch similar to yours which should address this
problem. Many thanks for tracking this down.



From: Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
To: bk-commits-head@xxxxxxxxxxxxxxx
Subject: Follow 2.4.x semantics for in-kernel signal sending.
Date: Sun, 20 Jun 2004 16:56:58 +0000
Sender: bk-commits-head-owner@xxxxxxxxxxxxxxx

ChangeSet 1.1769, 2004/06/20 09:56:58-07:00, torvalds@xxxxxxxxxxxxxxx

Follow 2.4.x semantics for in-kernel signal sending.



signal.c | 7 +++++++
1 files changed, 7 insertions(+)


diff -Nru a/kernel/signal.c b/kernel/signal.c
--- a/kernel/signal.c 2004-06-20 11:07:49 -07:00
+++ b/kernel/signal.c 2004-06-20 11:07:49 -07:00
@@ -1197,6 +1197,13 @@
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
* lists) in order to avoid races with "p->sighand"
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/