Re: [PATCH] time/alarmtimer: Add bounds checking for the timer interval and expiration

From: Thomas Gleixner
Date: Mon Jun 12 2017 - 11:41:53 EST


On Mon, 12 Jun 2017, Prarit Bhargava wrote:

> Running the syzkaller timer_hang_poc.c
> (https://groups.google.com/forum/#!topic/syzkaller/355tWdc8oHY) causes a
> kernel hang by passing in a time that results in the timer being started
> with an expiration that exceeds KTIME_MAX.
>
> Check for overflow values of expiration (exp) and interval.
>
> Also cleanup the code. Set and check the values, and then modify the
> timer.

This is already addressed in

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/urgent

I just did not come around to send it to Linus last week.

Thanks,

tglx