Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670884
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch 0/2] timers: Prevent multiplication overflow in timespec/val conversions |
| Date | 2017-06-20 17:50 +0200 |
| Message-ID | <tUtzH-238-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[patch 0/2] timers: Prevent multiplication overflow in timespec/val conversions Thomas Gleixner <tglx@linutronix.de> - 2017-06-20 17:50 +0200
[patch 1/2] itimer: Make timeval to nsec conversion range limited Thomas Gleixner <tglx@linutronix.de> - 2017-06-20 17:50 +0200
[tip:timers/core] itimer: Make timeval to nsec conversion range limited tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2017-06-20 21:50 +0200
[patch 2/2] posix-cpu-timers: Make timespec to nsec conversion safe Thomas Gleixner <tglx@linutronix.de> - 2017-06-20 17:50 +0200
[tip:timers/core] posix-cpu-timers: Make timespec to nsec conversion safe tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2017-06-20 21:50 +0200
csiph-web