Re: [Security] [PATCH] xtensa: prevent arbitrary read in ptrace
From: Andrew Morton
Date: Fri Jul 08 2011 - 14:42:46 EST
On Fri, 8 Jul 2011 18:35:56 +0000
"Dan Rosenberg" <drosenberg@xxxxxxxxxxxxx> wrote:
> Sorry for the top post and any email mangling (mobile).
>
> I only used EIO to mirror the existing behavior in ptrace_getxregs(). EFAULT seems better.
ptrace_getxregs() is busted ;)
int ptrace_getxregs(struct task_struct *child, void __user *uregs)
{
...
if (!access_ok(VERIFY_WRITE, uregs, sizeof(elf_xtregs_t)))
return -EIO;
...
ret |= __copy_to_user(&xtregs->user,&ti->xtregs_user,
sizeof(xtregs->user));
return ret ? -EFAULT : 0;
}
that makes no sense.
--
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/