[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20110708114238.d70315b7.akpm@linux-foundation.org>
Date: Fri, 8 Jul 2011 11:42:38 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: drosenberg@...curity.com
Cc: chris@...kel.net, security@...nel.org,
linux-kernel@...r.kernel.org, "Oleg Nesterov" <oleg@...hat.com>
Subject: Re: [Security] [PATCH] xtensa: prevent arbitrary read in ptrace
On Fri, 8 Jul 2011 18:35:56 +0000
"Dan Rosenberg" <drosenberg@...curity.com> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists