]> www.infradead.org Git - users/jedix/linux-maple.git/commit
regset: Return -EFAULT, not -EIO, on host-side memory fault
authorH. Peter Anvin <hpa@zytor.com>
Fri, 2 Mar 2012 18:43:49 +0000 (10:43 -0800)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 19 Apr 2012 22:37:47 +0000 (15:37 -0700)
commit7b40afe87ba9690d536bef9ddf4c494db447de6f
tree3f10581b7f44266af7f0a5eeaae885b441e9aad5
parent1fbeb24a047b9ee7d41996b0da12172ebb26c258
regset: Return -EFAULT, not -EIO, on host-side memory fault

There is only one error code to return for a bad user-space buffer
pointer passed to a system call in the same address space as the
system call is executed, and that is EFAULT.  Furthermore, the
low-level access routines, which catch most of the faults, return
EFAULT already.
This fixes: CVE-2012-1097

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@hack.frob.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/regset.h