tmp_suning_uos_patched/net/can
Marc Kleine-Budde 45221a57b6 can: isotp: convert struct tpcon::{idx,len} to unsigned int
commit 5f33a09e769a9da0482f20a6770a342842443776 upstream.

In isotp_rcv_ff() 32 bit of data received over the network is assigned
to struct tpcon::len. Later in that function the length is checked for
the maximal supported length against MAX_MSG_LENGTH.

As struct tpcon::len is an "int" this check does not work, if the
provided length overflows the "int".

Later on struct tpcon::idx is compared against struct tpcon::len.

To fix this problem this patch converts both struct tpcon::{idx,len}
to unsigned int.

Fixes: e057dd3fc2 ("can: add ISO 15765-2:2016 transport protocol")
Link: https://lore.kernel.org/all/20220105132429.1170627-1-mkl@pengutronix.de
Cc: stable@vger.kernel.org
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Reported-by: syzbot+4c63f36709a642f801c5@syzkaller.appspotmail.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-16 09:14:23 +01:00
..
j1939 can: j1939: j1939_tp_cmd_recv(): check the dst address of TP.CM_BAM 2021-12-08 09:03:17 +01:00
af_can.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
af_can.h can: introduce CAN midlayer private and allocate it automatically 2019-09-04 13:29:14 +02:00
bcm.c can: bcm: delay release of struct bcm_op after synchronize_rcu() 2021-07-14 16:55:41 +02:00
gw.c can: gw: synchronize rcu operations before removing gw job entry 2021-07-14 16:55:41 +02:00
isotp.c can: isotp: convert struct tpcon::{idx,len} to unsigned int 2022-01-16 09:14:23 +01:00
Kconfig can: isotp: Explain PDU in CAN_ISOTP help text 2020-11-03 22:30:31 +01:00
Makefile can: add ISO 15765-2:2016 transport protocol 2020-10-07 23:18:33 +02:00
proc.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
raw.c can: raw: raw_setsockopt(): fix raw_rcv panic for sock UAF 2021-08-04 12:46:40 +02:00