linux-stable/drivers/net
Shang XiaoJing 639f5d006e net: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start()
sparx_stats_init() calls create_singlethread_workqueue() and not
checked the ret value, which may return NULL. And a null-ptr-deref may
happen:

sparx_stats_init()
    create_singlethread_workqueue() # failed, sparx5->stats_queue is NULL
    queue_delayed_work()
        queue_delayed_work_on()
            __queue_delayed_work()  # warning here, but continue
                __queue_work()      # access wq->flags, null-ptr-deref

Check the ret value and return -ENOMEM if it is NULL. So as
sparx5_start().

Fixes: af4b11022e ("net: sparx5: add ethtool configuration and statistics support")
Fixes: b37a1bae74 ("net: sparx5: add mactable support")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-11-16 09:10:29 +00:00
..
appletalk
arcnet
bonding treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
caif
can can: rcar_canfd: Add missing ECC error checks for channels 2-7 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: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start() 2022-11-16 09:10:29 +00:00
fddi
fjes
hamradio hamradio: fix issue of dev reference count leakage in bpq_device_event() 2022-11-07 09:32:28 +00:00
hippi
hyperv net: hv_netvsc: Fix a warning triggered by memcpy in rndis_filter 2022-10-15 11:09:53 +01:00
ieee802154
ipa net: ipa: don't configure IDLE_INDICATION on v3.1 2022-10-25 19:49:13 -07:00
ipvlan
mctp mctp i2c: don't count unused / invalid keys for flow release 2022-11-11 20:13:27 -08:00
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
phy net: phy: marvell: add sleep time after enabling the loopback bit 2022-11-15 13:14:46 +01:00
plip
ppp
pse-pd net: pse-pd: PSE_REGULATOR should depend on REGULATOR 2022-10-05 20:32:28 -07:00
slip
team
usb TTY/Serial driver update for 6.1-rc1 2022-10-07 16:36:24 -07:00
vmxnet3
vxlan
wan net: lapbether: fix issue of invalid opcode in lapbeth_open() 2022-11-08 12:47:36 +01: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: fix kernel test robot reported errors 2022-11-09 14:00:25 +00:00
xen-netback
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
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: Use built-in RCU list checking 2022-11-14 10:50:02 +00:00
macvtap.c
Makefile net: add framework to support Ethernet PSE and PDs devices 2022-10-03 17:33:56 -07:00
mdio.c
mhi_net.c net: mhi: Fix memory leak in mhi_net_dellink() 2022-11-14 11:21:02 +00:00
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c net: tun: call napi_schedule_prep() to ensure we own a napi 2022-11-08 17:41:11 -08:00
veth.c
virtio_net.c virtio: fixes, features 2022-10-10 14:02:53 -07:00
vrf.c
vsockmon.c
xen-netfront.c