bianbu-linux-6.6/drivers/net
Oliver Hartkopp ae64438be1 can: dev: fix skb drop check
In commit a6d190f8c7 ("can: skb: drop tx skb if in listen only
mode") the priv->ctrlmode element is read even on virtual CAN
interfaces that do not create the struct can_priv at startup. This
out-of-bounds read may lead to CAN frame drops for virtual CAN
interfaces like vcan and vxcan.

This patch mainly reverts the original commit and adds a new helper
for CAN interface drivers that provide the required information in
struct can_priv.

Fixes: a6d190f8c7 ("can: skb: drop tx skb if in listen only mode")
Reported-by: Dariusz Stojaczyk <Dariusz.Stojaczyk@opensynergy.com>
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Cc: Max Staudt <max@enpas.org>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20221102095431.36831-1-socketcan@hartkopp.net
Cc: stable@vger.kernel.org # 6.0.x
[mkl: patch pch_can, too]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-11-07 14:00:27 +01:00
..
appletalk
arcnet
bonding treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
caif
can can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
dsa net: dsa: Fix possible memory leaks in dsa_loop_init() 2022-10-28 10:32:59 +01:00
ethernet net: fman: Unregister ethernet device on removal 2022-11-04 19:33:38 -07:00
fddi
fjes net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
hamradio hamradio: fix issue of dev reference count leakage in bpq_device_event() 2022-11-07 09:32:28 +00:00
hippi net: hippi: Add missing pci_disable_device() in rr_init_one() 2022-09-26 13:22:39 -07:00
hyperv net: hv_netvsc: Fix a warning triggered by memcpy in rndis_filter 2022-10-15 11:09:53 +01:00
ieee802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-01 12:58:02 -07:00
ipa net: ipa: don't configure IDLE_INDICATION on v3.1 2022-10-25 19:49:13 -07:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-22 13:02:10 -07:00
mctp
mdio net: mdiobus: search for PSE nodes by parsing PHY nodes. 2022-10-03 17:33:57 -07:00
netdevsim netdevsim: remove dir in nsim_dev_debugfs_init() when creating ports dir failed 2022-10-27 10:47:29 -07:00
pcs net: pcs: add new PCS driver for altera TSE PCS 2022-09-05 10:16:53 +01:00
phy net: mdio: fix undefined behavior in bit shift for __mdiobus_register 2022-11-02 20:30:51 -07:00
plip
ppp
pse-pd net: pse-pd: PSE_REGULATOR should depend on REGULATOR 2022-10-05 20:32:28 -07:00
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-22 13:02:10 -07:00
usb TTY/Serial driver update for 6.1-rc1 2022-10-07 16:36:24 -07:00
vmxnet3 net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
vxlan net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
wan net: lapbether: fix issue of dev reference count leakage in lapbeth_device_event() 2022-11-07 09:31:26 +00:00
wireguard treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
wireless wifi: ath11k: avoid deadlock during regulatory update in ath11k_regd_update() 2022-11-02 19:16:45 +02:00
wwan net: wwan: iosm: Remove unnecessary if_mutex lock 2022-11-07 09:38:04 +00:00
xen-netback net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
amt.c
bareudp.c
dummy.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
eql.c
geneve.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
gtp.c
ifb.c
Kconfig - Yu Zhao's Multi-Gen LRU patches are here. They've been under test in 2022-10-10 17:53:04 -07:00
LICENSE.SRC
loopback.c
macsec.c macsec: clear encryption keys from the stack after setting up offload 2022-11-04 10:43:56 +00:00
macvlan.c net: macvlan: change schedule system_wq to system_unbound_wq 2022-10-14 08:28:19 +01:00
macvtap.c net: macvtap: add __init/__exit annotations to module init/exit funcs 2022-09-21 18:22:30 -07:00
Makefile net: add framework to support Ethernet PSE and PDs devices 2022-10-03 17:33:56 -07:00
mdio.c
mhi_net.c
mii.c
net_failover.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
netconsole.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
nlmon.c
ntb_netdev.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
rionet.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
sb1000.c
Space.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
sungem_phy.c
tap.c
thunderbolt.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
tun.c net: tun: Fix memory leaks of napi_get_frags 2022-11-04 10:56:22 +00:00
veth.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
virtio_net.c virtio: fixes, features 2022-10-10 14:02:53 -07:00
vrf.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
vsockmon.c
xen-netfront.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00