summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2019-01-13 19:31:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-31 08:13:46 +0100
commite7126858fc71ccee69220e06e2f97190de85db67 (patch)
treeb1837ab057eaef67c4216ce1d255611db8c4a8fb /drivers/tty
parent8849347d9cdacbd845ff0a5add3203f4eb599433 (diff)
can: bcm: check timer values before ktime conversion
commit 93171ba6f1deffd82f381d36cb13177872d023f6 upstream. Kyungtae Kim detected a potential integer overflow in bcm_[rx|tx]_setup() when the conversion into ktime multiplies the given value with NSEC_PER_USEC (1000). Reference: https://marc.info/?l=linux-can&m=154732118819828&w=2 Add a check for the given tv_usec, so that the value stays below one second. Additionally limit the tv_sec value to a reasonable value for CAN related use-cases of 400 days and ensure all values to be positive. Reported-by: Kyungtae Kim <kt0755@gmail.com> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Cc: linux-stable <stable@vger.kernel.org> # >= 2.6.26 Tested-by: Kyungtae Kim <kt0755@gmail.com> Acked-by: Andre Naujoks <nautsch2@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
0 files changed, 0 insertions, 0 deletions