This is a note to let you know that I've just added the patch titled
mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy
to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git%3Ba=su...
The filename of the patch is: mn10300-misalignment-use-sigsegv-segv_maperr-to-report-a-failed-user-copy.patch and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let stable@vger.kernel.org know about it.
From 6ac1dc736b323011a55ecd1fc5897c24c4f77cbd Mon Sep 17 00:00:00 2001
From: "Eric W. Biederman" ebiederm@xmission.com Date: Tue, 1 Aug 2017 05:02:38 -0500 Subject: mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy
From: Eric W. Biederman ebiederm@xmission.com
commit 6ac1dc736b323011a55ecd1fc5897c24c4f77cbd upstream.
Setting si_code to 0 is the same a setting si_code to SI_USER which is definitely not correct. With si_code set to SI_USER si_pid and si_uid will be copied to userspace instead of si_addr. Which is very wrong.
So fix this by using a sensible si_code (SEGV_MAPERR) for this failure.
Fixes: b920de1b77b7 ("mn10300: add the MN10300/AM33 architecture to the kernel") Cc: David Howells dhowells@redhat.com Cc: Masakazu Urade urade.masakazu@jp.panasonic.com Cc: Koichi Yasutake yasutake.koichi@jp.panasonic.com Signed-off-by: "Eric W. Biederman" ebiederm@xmission.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
--- arch/mn10300/mm/misalignment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mn10300/mm/misalignment.c +++ b/arch/mn10300/mm/misalignment.c @@ -437,7 +437,7 @@ transfer_failed:
info.si_signo = SIGSEGV; info.si_errno = 0; - info.si_code = 0; + info.si_code = SEGV_MAPERR; info.si_addr = (void *) regs->pc; force_sig_info(SIGSEGV, &info, current); return;
Patches currently in stable-queue which might be from ebiederm@xmission.com are
queue-4.9/signal-openrisc-fix-do_unaligned_access-to-send-the-proper-signal.patch queue-4.9/signal-sh-ensure-si_signo-is-initialized-in-do_divide_error.patch queue-4.9/mn10300-misalignment-use-sigsegv-segv_maperr-to-report-a-failed-user-copy.patch
linux-stable-mirror@lists.linaro.org