mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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 <[email protected]> Tested-by: Oliver Hartkopp <[email protected]> Signed-off-by: Oliver Hartkopp <[email protected]> Cc: linux-stable <[email protected]> # >= 2.6.26 Tested-by: Kyungtae Kim <[email protected]> Acked-by: Andre Naujoks <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>