From: Al Viro Date: Sat, 25 Mar 2017 04:43:43 +0000 (-0400) Subject: alpha: fix stack smashing in old_adjtimex(2) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c87ea4566612ef37e31f6389cbb232bd49cdd45;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git alpha: fix stack smashing in old_adjtimex(2) Signed-off-by: Al Viro --- diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 0b961093ca5c..6d76e528ab8f 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -1290,7 +1290,7 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p) /* copy relevant bits of struct timex. */ if (copy_from_user(&txc, txc_p, offsetof(struct timex32, time)) || copy_from_user(&txc.tick, &txc_p->tick, sizeof(struct timex32) - - offsetof(struct timex32, time))) + offsetof(struct timex32, tick))) return -EFAULT; ret = do_adjtimex(&txc);