linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/2] posix-timers: Sanitize posix timer overrun handling
@ 2018-06-26 13:21 Thomas Gleixner
  2018-06-26 13:21 ` [patch 1/2] posix-timers: Make forward callback return s64 Thomas Gleixner
  2018-06-26 13:21 ` [patch 2/2] posix-timers: Sanitize overrun handling Thomas Gleixner
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Gleixner @ 2018-06-26 13:21 UTC (permalink / raw)
  To: LKML; +Cc: John Stultz, Peter Zijlstra, Michael Kerrisk, air icy

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(-)





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-02  9:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 13:21 [patch 0/2] posix-timers: Sanitize posix timer overrun handling Thomas Gleixner
2018-06-26 13:21 ` [patch 1/2] posix-timers: Make forward callback return s64 Thomas Gleixner
2018-06-29  4:25   ` John Stultz
2018-07-02  9:36   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2018-06-26 13:21 ` [patch 2/2] posix-timers: Sanitize overrun handling Thomas Gleixner
2018-06-29  4:24   ` John Stultz
2018-07-02  9:37   ` [tip:timers/core] " tip-bot for Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).