1
0
Fork 0
alistair23-linux/include/linux/can
Oliver Hartkopp a0dbd93fb1 can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs
commit e7153bf70c upstream.

KMSAN sysbot detected a read access to an untinitialized value in the
headroom of an outgoing CAN related sk_buff. When using CAN sockets this
area is filled appropriately - but when using a packet socket this
initialization is missing.

The problematic read access occurs in the CAN receive path which can
only be triggered when the sk_buff is sent through a (virtual) CAN
interface. So we check in the sending path whether we need to perform
the missing initializations.

Fixes: d3b58c47d3 ("can: replace timestamp as unique skb attribute")
Reported-by: syzbot+b02ff0707a97e4e79ebb@syzkaller.appspotmail.com
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-stable <stable@vger.kernel.org> # >= v4.1
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14 20:08:28 +01:00
..
dev treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
platform can: rcar_can: Remove unused platform data support 2019-08-20 13:41:25 +02:00
can-ml.h can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
core.h can: af_can: export can_sock_destruct() 2019-11-13 10:42:33 +01:00
dev.h can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs 2020-01-14 20:08:28 +01:00
led.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rx-offload.h can: dev: avoid long lines 2019-09-03 10:28:13 +02:00
skb.h can: Add SPDX license identifiers for CAN subsystem 2019-07-24 10:31:55 +02:00