[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170620153734.970526461@linutronix.de>
Date: Tue, 20 Jun 2017 17:37:34 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: John Stultz <john.stultz@...aro.org>,
Peter Zijlstra <peterz@...radead.org>,
Xishi Qiu <qiuxishi@...wei.com>
Subject: [patch 0/2] timers: Prevent multiplication overflow in timespec/val
conversions
KASAN detected a multiplication overflow in the sys_setitimer() timeval
conversion. The same issue is possible the posix-cpu-timer sys_timer_set()
implementation.
In both cases the conversion of the tv_sec part overflows when multiplied
with NSEC_PER_SEC, i.e. 1e9.
This can be mitigated by using the timespec/val_to_ktime() helper, which
prevents the overflow and clamps the result to KTIME_MAX (~292 years).
Thanks,
tglx
Powered by blists - more mailing lists