linux_dsm_epyc7002/net/can
Oliver Hartkopp 93171ba6f1 can: bcm: check timer values before ktime conversion
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>
2019-01-22 11:33:46 +01:00
..
af_can.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
af_can.h
bcm.c can: bcm: check timer values before ktime conversion 2019-01-22 11:33:46 +01:00
gw.c can: gw: ensure DLC boundaries after CAN frame modification 2019-01-07 05:17:51 -08:00
Kconfig
Makefile
proc.c proc: introduce proc_create_net_single 2018-05-16 07:24:30 +02:00
raw.c net: add missing SOF_TIMESTAMPING_OPT_ID support 2018-12-17 23:27:00 -08:00