Skip to contentSkip to conversation

Patch "alpha: osf_sys.c: fix put_tv32 regression" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Feb 15, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

alpha: osf_sys.c: fix put_tv32 regression

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
alpha-osf_sys.c-fix-put_tv32-regression.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 47669fb6b5951d0e09fc99719653e0ac92b50b99 Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Wed, 8 Nov 2017 16:02:13 +0100
Subject: alpha: osf_sys.c: fix put_tv32 regression

From: Arnd Bergmann <[email protected]>

commit 47669fb6b5951d0e09fc99719653e0ac92b50b99 upstream.

There was a typo in the new version of put_tv32() that caused an unguarded access of a user space pointer, and failed to return the correct result in gettimeofday(), wait4(), usleep_thread() and old_adjtimex().

This fixes it to give the correct behavior again.

Fixes 1cc6c4635e9f ("osf_sys.c: switch handling of timeval32/itimerval32 to copy_{to,from}_user()")
---
 arch/alpha/kernel/osf_sys.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/alpha/kernel/osf_sys.c +2 -2
@@ -964,8 +964,8 @@ static inline long
 put_tv32(struct timeval32 __user *o, struct timeval *i)
 {
 	return copy_to_user(o, &(struct timeval32){
-				.tv_sec = o->tv_sec,
-				.tv_usec = o->tv_usec},
+				.tv_sec = i->tv_sec,
+				.tv_usec = i->tv_usec},
 			    sizeof(struct timeval32));
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/kasan-rework-kconfig-settings.patch queue-4.14/mtd-cfi-convert-inline-functions-to-macros.patch queue-4.14/signal-openrisc-fix-do_unaligned_access-to-send-the-proper-signal.patch queue-4.14/media-dvb-frontends-fix-i2c-access-helpers-for-kasan.patch queue-4.14/alpha-osf_sys.c-fix-put_tv32-regression.patch