Commit 56ef5ae6 authored by Zhang Xiaoxu's avatar Zhang Xiaoxu Committed by Xie XiuQi
Browse files

timekeeping: Fix ktime_add overflow in tk_set_wall_to_mono



euler inclusion
category: bugfix
Bugzilla: 5380
CVE: N/A
----------------------------------------

Syzkaller report UBSAN bug:
UBSAN: Undefined behaviour in kernel/time/timekeeping.c:98:17
signed integer overflow:
8589935550743139462 + 2147483647000000000 cannot be represented
in type 'long long int'

Use add_time_safe instead add_time in tk_set_wall_to_mono.

Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 22e88bfb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment