[PATCH][2.4-rc1] fix side effects of the kmod/ptrace secfix

From: Bernhard Kaindl (kaindl@telering.at)
Date: Fri Apr 25 2003 - 05:40:24 EST


On Fri, 25 Apr 2003, Andreas Gietl wrote:
> > system monitoring stuff this way(I've even heard shutdown is affected)
>
> i can confirm that shutdown (halt|reboot) does not work on my 2.4.21-rc1-ac1
> boxes. (gentoo + redhat).

Thanks for the info!

> But your patch does not seem to fix it.

Very interesting also, the two liner adressed only the well-known problems.
To fix the other not so well-known side effects, a real cleanup is the way
to go.

Can you try the attached cleanup patch instead of the two-liner?

It's an inital cleanup and should fix the other side effects which
I described in my mails.

Bernhard Kaindl

PS: If either patch is applied correctly, this

        su guest -c 'ps $PPID;wc -m </proc/$PPID/cmdline'

should give:

  PID TTY STAT TIME COMMAND
 2452 pts/2 S 0:00 su bin -c ps $PPID;wc -m </proc/$PPID/cmdline
     46

If it does not, access_process_vm is not fixed properly.

Second, calling this as root:

        strace -fewrite su -c /bin/echo 2>&1 | grep pid

should give:

[pid 2599] --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
[pid 2599] write(1, "\n", 1

If it does not, ptrace_check_attach is not fixed properly.

(These are only the checks for the well known side
effects which should be fixed even with the short
is_dumpable() -> task_dumpable patch.)


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



This archive was generated by hypermail 2b29 : Wed Apr 30 2003 - 22:00:20 EST