Messages in this thread | | | Date | Tue, 26 Jun 2018 15:21:30 +0200 | From | Thomas Gleixner <> | Subject | [patch 0/2] posix-timers: Sanitize posix timer overrun handling |
| |
Icy reported an UBSAN splat in the posix timer code, which is caused by the way the overrun accounting works. Depending on interval and expiry time the overrun can be larger than INT_MAX, but the accounting is int based which basically makes the accounting values, which are visible to user space via timer_getoverrrun(2) and siginfo::si_overrun, random.
The following series addresses this by converting the internal accounting to 64bit and clamping the user space visible values to INT_MAX.
Thanks,
tglx
8<------------------- b/include/linux/posix-timers.h | 4 ++-- kernel/time/alarmtimer.c | 4 ++-- kernel/time/posix-cpu-timers.c | 2 +- kernel/time/posix-timers.c | 33 +++++++++++++++++++++------------ kernel/time/posix-timers.h | 2 +- 5 files changed, 27 insertions(+), 18 deletions(-)
| |