WSL2-Linux-Kernel/drivers/net/can
Tong Zhang 644d0a5bcc can: c_can: fix null-ptr-deref on ioctl()
The pdev maybe not a platform device, e.g. c_can_pci device, in this
case, calling to_platform_device() would not make sense. Also, per the
comment in drivers/net/can/c_can/c_can_ethtool.c, @bus_info should
match dev_name() string, so I am replacing this with dev_name() to fix
this issue.

[    1.458583] BUG: unable to handle page fault for address: 0000000100000000
[    1.460921] RIP: 0010:strnlen+0x1a/0x30
[    1.466336]  ? c_can_get_drvinfo+0x65/0xb0 [c_can]
[    1.466597]  ethtool_get_drvinfo+0xae/0x360
[    1.466826]  dev_ethtool+0x10f8/0x2970
[    1.467880]  sock_ioctl+0xef/0x300

Fixes: 2722ac986e ("can: c_can: add ethtool support")
Link: https://lore.kernel.org/r/20210906233704.1162666-1-ztong0001@gmail.com
Cc: stable@vger.kernel.org # 5.14+
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-09-07 08:46:58 +02:00
..
c_can can: c_can: fix null-ptr-deref on ioctl() 2021-09-07 08:46:58 +02:00
cc770
dev can: netlink: allow user to turn off unsupported features 2021-08-19 15:07:03 +02:00
ifi_canfd
m_can can: m_can: Batch FIFO writes during CAN transmit 2021-08-19 15:07:04 +02:00
mscan can: mscan: mpc5xxx_can: mpc5xxx_can_probe(): remove useless BUG_ON() 2021-08-25 08:25:11 +02:00
peak_canfd can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path 2021-06-24 08:40:10 +02:00
rcar can: rcar_canfd: add __maybe_unused annotation to silence warning 2021-09-07 08:45:54 +02:00
sja1000 can: peak_pci: Add name and FW version of the card in kernel buffer 2021-07-25 11:36:27 +02:00
softing can: softing: Remove redundant variable ptr 2021-05-27 09:42:22 +02:00
spi can: mcp251xfd: mark some instances of struct mcp251xfd_priv as const 2021-08-19 15:07:03 +02:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-26 17:57:57 -07:00
Kconfig can: flexcan: update Kconfig to enable coldfire 2021-07-25 11:36:29 +02:00
Makefile
at91_can.c net: at91_can: fix the comments style issue 2021-07-25 11:36:27 +02:00
flexcan.c can: flexcan: flexcan_clks_enable(): add missing variable initialization 2021-08-04 12:11:56 +02:00
grcan.c
janz-ican3.c can: janz-ican3: use DEVICE_ATTR_RO/RW() helper macro 2021-07-25 11:36:26 +02:00
kvaser_pciefd.c
led.c
pch_can.c
slcan.c tty: no checking of tty_unregister_ldisc 2021-05-13 16:57:17 +02:00
sun4i_can.c
ti_hecc.c can: rx-offload: add skb queue for use during ISR 2021-07-25 11:36:25 +02:00
vcan.c
vxcan.c
xilinx_can.c