2.2.0-pre6: print_child_state() floods syslog

storner@image.dk
Sun, 10 Jan 1999 11:12:54 +0100 (CET)


While debugging some user-level code today, I was puzzled by
a flood of messages appearing on the console and in the syslog
when I was running gdb. Like these:

Jan 10 10:02:20 osiris kernel: Process: unmime (stack=c6979ef0, task=c6978000)
Jan 10 10:02:20 osiris kernel: [<c010868f>] [<c0119655>] [<c0100000>] [<c010e6f1>] [<c010e951>] [<c0108eff>] [<c0108a39>] [<c010897c>]
Jan 10 10:02:20 osiris kernel: Process: unmime (stack=c6979ef0, task=c6978000)
Jan 10 10:02:20 osiris kernel: [<c010868f>] [<c0119655>] [<c0100000>] [<c010e6f1>] [<c010e951>] [<c0108eff>] [<c0108a39>] [<c010897c>]
Jan 10 10:02:20 osiris kernel: Process: unmime (stack=c6979ef0, task=c6978000)
Jan 10 10:02:20 osiris kernel: [<c010868f>] [<c0119655>] [<c0100000>] [<c010e6f1>] [<c010e951>] [<c0108eff>] [<c0108a39>] [<c010897c>]

(The problem I was debugging turned out to be a simple null-pointer
dereferencing - isspace(*p) with p==null).

They were annoying, and I guess one could launch a denial-of-service
attack through this (flooding syslog, filling up the log-file partition).

The printouts come from arch/i386/kernel/ptrace.c:print_child_state(),
which is called from sys_ptrace() in the same file. Judging from the
indentation, it looks like a debugging printout that was not removed
before putting it into the kernel sources ?

read_unlock(&tasklist_lock); /* FIXME!!! */
if (!child)
goto out;
print_child_state(child);
ret = -EPERM;
if (pid == 1) /* you may not mess with init */
goto out;

I guess the call to print_child_state() should be removed ?

-- 
Henrik Storner
                         Praeterea censeo, Microsoftem esse delendam!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/