]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
time: settimeofday: Validate the values of tv from user
authorSasha Levin <sasha.levin@oracle.com>
Thu, 4 Dec 2014 00:22:48 +0000 (19:22 -0500)
committerJohn Stultz <john.stultz@linaro.org>
Wed, 7 Jan 2015 17:49:14 +0000 (09:49 -0800)
commit6ada1fc0e1c4775de0e043e1bd3ae9d065491aa5
treeb6a02726aa5f93ccb61e7161c7705590424f7830
parentb2776bf7149bddd1f4161f14f79520f17fc1d71d
time: settimeofday: Validate the values of tv from user

An unvalidated user input is multiplied by a constant, which can result in
an undefined behaviour for large values. While this is validated later,
we should avoid triggering undefined behaviour.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
[jstultz: include trivial milisecond->microsecond correction noticed
by Andy]
Signed-off-by: John Stultz <john.stultz@linaro.org>
include/linux/time.h
kernel/time/time.c