diff options
author | 2019-01-13 19:31:43 +0100 | |
---|---|---|
committer | 2019-01-22 11:33:46 +0100 | |
commit | 93171ba6f1deffd82f381d36cb13177872d023f6 (patch) | |
tree | 5f561038080d2b31941a39fec548e60edfc28e4c /tools/perf/scripts/python/export-to-sqlite.py | |
parent | can: dev: __can_get_echo_skb(): fix bogous check for non-existing skb by removing it (diff) | |
download | wireguard-linux-93171ba6f1deffd82f381d36cb13177872d023f6.tar.xz wireguard-linux-93171ba6f1deffd82f381d36cb13177872d023f6.zip |
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions