Re: 2.4+ptrace exploit fix breaks root's ability to strace

Russell King
2003-03-22T17:50:27Z

On Sat, Mar 22, 2003 at 07:09:08PM +0000, Alan Cox wrote:
> On Sat, 2003-03-22 at 17:13, Russell King wrote:
> > ptrace has always explicitly allowed a process with the CAP_SYS_PTRACE
> > capability to ptrace a task which isn't dumpable. With the ptrace "fix"
> > in place, you can attach to a non-dumpable thread:
>
> Note that this is a bug, and is now a fixed bug. The looser check you
> can do requires you check
>
> my_capabilities >= his capbilities
>
> Otherwise you have priviledge escalation for CAP_SYS_PTRACE to
> CAP_SYS_RAWIO trivially

In which case we should not allow ptrace to even attach to the process.
Currently you can attach to such a process and stop it running, even if
you have lesser priviledges than the child.

Therefore, I wouldn't call this "fixed" in the existing ptrace patch.

--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux