提交 718bcceb 编写于 作者: T Thomas Gleixner 提交者: Linus Torvalds

[PATCH] hrtimer: validate timespec of do_sys_settimeofday

Check if the timespec which is provided from user space is normalized.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 5f82b2b7
......@@ -154,6 +154,9 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz)
static int firsttime = 1;
int error = 0;
if (!timespec_valid(tv))
return -EINVAL;
error = security_settime(tv, tz);
if (error)
return error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册