Commit 1c87ea45 authored by Al Viro's avatar Al Viro

alpha: fix stack smashing in old_adjtimex(2)

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e73a67f7
...@@ -1290,7 +1290,7 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p) ...@@ -1290,7 +1290,7 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
/* copy relevant bits of struct timex. */ /* copy relevant bits of struct timex. */
if (copy_from_user(&txc, txc_p, offsetof(struct timex32, time)) || if (copy_from_user(&txc, txc_p, offsetof(struct timex32, time)) ||
copy_from_user(&txc.tick, &txc_p->tick, sizeof(struct timex32) - copy_from_user(&txc.tick, &txc_p->tick, sizeof(struct timex32) -
offsetof(struct timex32, time))) offsetof(struct timex32, tick)))
return -EFAULT; return -EFAULT;
ret = do_adjtimex(&txc); ret = do_adjtimex(&txc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment