1
0
Fork 0
alistair23-linux/net/can
Oliver Hartkopp c358e7e99d can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check
commit d73ff9b7c4 upstream.

To detect potential bugs in CAN protocol implementations (double removal of
receiver entries) a WARN() statement has been used if no matching list item was
found for removal.

The fault injection issued by syzkaller was able to create a situation where
the closing of a socket runs simultaneously to the notifier call chain for
removing the CAN network device in use.

This case is very unlikely in real life but it doesn't break anything.
Therefore we just replace the WARN() statement with pr_warn() to preserve the
notification for the CAN protocol development.

Reported-by: syzbot+381d06e0c8eaacb8706f@syzkaller.appspotmail.com
Reported-by: syzbot+d0ddd88c9a7432f041e6@syzkaller.appspotmail.com
Reported-by: syzbot+76d62d3b8162883c7d11@syzkaller.appspotmail.com
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/r/20201126192140.14350-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-11 13:23:32 +01:00
..
j1939 can: j1939: j1939_sk_bind(): return failure if netdev is down 2020-11-18 19:20:19 +01:00
Kconfig can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
Makefile can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
af_can.c can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check 2020-12-11 13:23:32 +01:00
af_can.h can: introduce CAN midlayer private and allocate it automatically 2019-09-04 13:29:14 +02:00
bcm.c can: introduce CAN_REQUIRED_SIZE macro 2019-09-04 13:29:15 +02:00
gw.c can: gw: add support for CAN FD frames 2019-08-13 17:32:21 +02:00
proc.c can: proc: can_remove_proc(): silence remove_proc_entry warning 2020-11-22 10:14:12 +01:00
raw.c can: introduce CAN_REQUIRED_SIZE macro 2019-09-04 13:29:15 +02:00