linux/drivers/net
Deren Wu 13946d5a68 mt76: fix monitor mode crash with sdio driver
[ Upstream commit 123bc712b1 ]

mt7921s driver may receive frames with fragment buffers. If there is a
CTS packet received in monitor mode, the payload is 10 bytes only and
need 6 bytes header padding after RXD buffer. However, only RXD in the
first linear buffer, if we pull buffer size RXD-size+6 bytes with
skb_pull(), that would trigger "BUG_ON(skb->len < skb->data_len)" in
__skb_pull().

To avoid the nonlinear buffer issue, enlarge the RXD size from 128 to
256 to make sure all MCU operation in linear buffer.

[   52.007562] kernel BUG at include/linux/skbuff.h:2313!
[   52.007578] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[   52.007987] pc : skb_pull+0x48/0x4c
[   52.008015] lr : mt7921_queue_rx_skb+0x494/0x890 [mt7921_common]
[   52.008361] Call trace:
[   52.008377]  skb_pull+0x48/0x4c
[   52.008400]  mt76s_net_worker+0x134/0x1b0 [mt76_sdio 35339a92c6eb7d4bbcc806a1d22f56365565135c]
[   52.008431]  __mt76_worker_fn+0xe8/0x170 [mt76 ef716597d11a77150bc07e3fdd68eeb0f9b56917]
[   52.008449]  kthread+0x148/0x3ac
[   52.008466]  ret_from_fork+0x10/0x30

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 20:59:09 +02:00
..
appletalk
arcnet net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe() 2022-03-08 19:12:46 +01:00
bonding bonding: fix data-races around agg_select_timer 2022-02-23 12:03:12 +01:00
caif
can can: etas_es58x: es58x_fd_rx_event_msg(): initialize rx_event_msg before calling es58x_check_msg_len() 2022-04-13 20:59:08 +02:00
dsa net: dsa: bcm_sf2_cfp: fix an incorrect NULL check on list iterator 2022-04-08 14:23:54 +02:00
ethernet net/mlx5e: Remove overzealous validations in netlink EEPROM query 2022-04-13 20:59:09 +02:00
fddi
fjes
hamradio drivers: hamradio: 6pack: fix UAF bug caused by mod_timer() 2022-04-08 14:22:59 +02:00
hippi
hyperv hv_netvsc: Add check for kvmalloc_array 2022-03-23 09:16:42 +01:00
ieee802154 net: ieee802154: ca8210: Fix lifs/sifs periods 2022-02-23 12:03:11 +01:00
ipa net: ipa: add an interconnect dependency 2022-03-08 19:12:45 +01:00
ipvlan
mctp
mdio net: mdio-ipq4019: add delay after clock enable 2022-03-02 11:47:58 +01:00
netdevsim ipv6: fix data-race in fib6_info_hw_flags_set / fib6_purge_rt 2022-02-23 12:03:10 +01:00
pcs
phy net: sfp: add 2500base-X quirk for Lantech SFP module 2022-04-13 20:59:09 +02:00
plip
ppp ppp: ensure minimum packet size in ppp_write() 2022-01-27 11:03:52 +01:00
slip slip: fix macro redefine warning 2022-03-11 12:22:31 +01:00
team
usb net: asix: add proper error handling of usb read errors 2022-04-08 14:23:29 +02:00
vmxnet3
wan
wireguard wireguard: socket: ignore v6 endpoints when ipv6 is disabled 2022-04-08 14:24:09 +02:00
wireless mt76: fix monitor mode crash with sdio driver 2022-04-13 20:59:09 +02:00
wwan net: wwan: Fix MRU mismatch issue which may lead to data connection lost 2022-01-27 11:05:40 +01:00
xen-netback Revert "xen-netback: Check for hotplug-status existence before watching" 2022-03-16 14:23:41 +01:00
bareudp.c bareudp: use ipv6_mod_enabled to check if IPv6 enabled 2022-04-08 14:23:41 +02:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c net: macsec: Verify that send_sci is on when setting Tx sci explicitly 2022-02-08 18:34:09 +01:00
macvlan.c
macvtap.c macvtap: advertise link netns via netlink 2022-04-13 20:59:07 +02:00
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c tuntap: add sanity checks about msg_controllen in sendmsg 2022-04-13 20:59:07 +02:00
thunderbolt.c
tun.c tuntap: add sanity checks about msg_controllen in sendmsg 2022-04-13 20:59:07 +02:00
veth.c veth: fix races around rq->rx_notify_masked 2022-02-16 12:56:30 +01:00
virtio_net.c
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c xen/netfront: react properly to failing gnttab_end_foreign_access_ref() 2022-03-11 12:22:37 +01:00