Skip to content
Snippets Groups Projects
Commit 4234e575 authored by zhengbin's avatar zhengbin Committed by 谢秀奇
Browse files

time: Validate user input in compat_settimeofday()


mainline inclusion
from mainline-v5.2
commit 9176ab1b
category: bugfix
bugzilla: 16631
CVE: NA
---------------------------

The user value is validated after converting the timeval to a timespec, but
for a wide range of negative tv_usec values the multiplication overflow turns
them in positive numbers. So the 'validated later' is not catching the
invalid input.

Signed-off-by: default avatarzhengbin <zhengbin13@huawei.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1562460701-113301-1-git-send-email-zhengbin13@huawei.com


Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 775b3ed5
No related branches found
No related tags found
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