lkml.org 
[lkml]   [2018]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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(-)




\
 
 \ /
  Last update: 2018-06-26 15:28    [W:0.054 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site