All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: Al Viro <viro@zeniv.linux.org.uk>, Jiri Slaby <jslaby@suse.cz>
Subject: [patch added to 3.12-stable] mn10300: copy_from_user() should zero on access_ok() failure...
Date: Thu, 29 Sep 2016 11:06:49 +0200	[thread overview]
Message-ID: <20160929090654.27405-38-jslaby@suse.cz> (raw)
In-Reply-To: <20160929090654.27405-1-jslaby@suse.cz>

From: Al Viro <viro@zeniv.linux.org.uk>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit ae7cc577ec2a4a6151c9e928fd1f595d953ecef1 upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 arch/mn10300/lib/usercopy.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/mn10300/lib/usercopy.c b/arch/mn10300/lib/usercopy.c
index 7826e6c364e7..ce8899e5e171 100644
--- a/arch/mn10300/lib/usercopy.c
+++ b/arch/mn10300/lib/usercopy.c
@@ -9,7 +9,7 @@
  * as published by the Free Software Foundation; either version
  * 2 of the Licence, or (at your option) any later version.
  */
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 unsigned long
 __generic_copy_to_user(void *to, const void *from, unsigned long n)
@@ -24,6 +24,8 @@ __generic_copy_from_user(void *to, const void *from, unsigned long n)
 {
 	if (access_ok(VERIFY_READ, from, n))
 		__copy_user_zeroing(to, from, n);
+	else
+		memset(to, 0, n);
 	return n;
 }
 
-- 
2.10.0


  parent reply	other threads:[~2016-09-29  9:07 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29  9:06 [patch added to 3.12-stable] clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe function Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] NFSv4.x: Fix a refcount leak in nfs_callback_up_net Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] dm flakey: fix reads to be issued if drop_writes configured Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] x86/paravirt: Do not trace _paravirt_ident_*() functions Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] kvm-arm: Unmap shadow pagetables properly Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] iio: accel: kxsd9: Fix raw read return Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] iio: accel: kxsd9: Fix scaling bug Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] USB: serial: simple: add support for another Infineon flashloader Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] usb: renesas_usbhs: fix clearing the {BRDY,BEMP}STS condition Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] USB: change bInterval default to 10 ms Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] ARM: OMAP3: hwmod data: Add sysc information for DSI Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] crypto: cryptd - initialize child shash_desc on import Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] microblaze: fix __get_user() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] avr32: fix copy_from_user() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] microblaze: " Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] fix minor infoleak in get_user_ex() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] mn10300: failing __get_user() and get_user() should zero Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] m32r: fix __get_user() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] sh64: failing __get_user() should zero Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] score: fix __get_user/get_user Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] s390: get_user() should zero on failure Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] ARC: uaccess: get_user to zero out dest in cause of fault Jiri Slaby
2016-09-29  9:06   ` Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] asm-generic: make get_user() clear the destination on errors Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] frv: fix clear_user() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] cris: buggered copy_from_user/copy_to_user/clear_user Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] blackfin: fix copy_from_user() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] score: fix copy_from_user() and friends Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] sh: fix copy_from_user() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] hexagon: fix strncpy_from_user() error return Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] mips: copy_from_user() must zero the destination on access_ok() failure Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] asm-generic: make copy_from_user() zero the destination properly Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] alpha: fix copy_from_user() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] metag: copy_from_user() should zero the destination on access_ok() failure Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] parisc: fix copy_from_user() Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] openrisc: " Jiri Slaby
2016-09-29  9:06 ` Jiri Slaby [this message]
2016-09-29  9:06 ` [patch added to 3.12-stable] sparc32: " Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] ppc32: " Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] ia64: copy_from_user() should zero the destination on access_ok() failure Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] avr32: fix 'undefined reference to `___copy_from_user' Jiri Slaby
2016-09-29  9:06 ` [patch added to 3.12-stable] openrisc: fix the fix of copy_from_user() Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160929090654.27405-38-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.