linux/drivers/net
Igor Russkikh 7bb26ea74a net: atlantic: fix double free in ring reinit logic
Driver has a logic leak in ring data allocation/free,
where double free may happen in aq_ring_free if system is under
stress and driver init/deinit is happening.

The probability is higher to get this during suspend/resume cycle.

Verification was done simulating same conditions with

    stress -m 2000 --vm-bytes 20M --vm-hang 10 --backoff 1000
    while true; do sudo ifconfig enp1s0 down; sudo ifconfig enp1s0 up; done

Fixed by explicitly clearing pointers to NULL on deallocation

Fixes: 018423e90b ("net: ethernet: aquantia: Add ring support code")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/netdev/CAHk-=wiZZi7FcvqVSUirHBjx0bBUZ4dFrMDVLc3+3HCrtq0rBA@mail.gmail.com/
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Link: https://lore.kernel.org/r/20231213094044.22988-1-irusskikh@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-12-14 12:10:59 +01:00
..
arcnet arcnet: restoring support for multiple Sohard Arcnet cards 2023-12-04 18:01:20 -08:00
bonding bonding: stop the device in bond_setup_by_slave() 2023-11-13 20:55:08 -08:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-10-12 17:07:34 -07:00
dsa net: dsa: microchip: provide a list of valid protocols for xmit handler 2023-12-07 10:03:17 -08:00
ethernet net: atlantic: fix double free in ring reinit logic 2023-12-14 12:10:59 +01:00
fddi
fjes
hamradio hamradio: replace deprecated strncpy with strscpy_pad 2023-10-17 17:59:55 -07:00
hippi
hyperv hv_netvsc: rndis_filter needs to select NLS 2023-12-01 20:12:24 -08:00
ieee802154 net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show() 2023-10-22 11:28:43 +01:00
ipa net: ipa: fix one GSI register field width 2023-11-23 08:52:00 -08:00
ipvlan ipvlan: add ipvlan_route_v6_outbound() helper 2023-11-10 10:59:22 +00:00
mctp mctp i3c: MCTP I3C driver 2023-10-17 12:45:03 +02:00
mdio net: mdio: fill in missing MODULE_DESCRIPTION()s 2023-11-01 21:50:57 -07:00
netdevsim netdevsim: Don't accept device bound programs 2023-11-23 13:04:04 -08:00
pcs net: pcs: xpcs: Add 2500BASE-X case in get state for XPCS drivers 2023-10-27 15:59:44 -07:00
phy net: phylink: initialize carrier state at creation 2023-11-07 22:32:23 +00:00
plip
ppp ppp: limit MRU to 64K 2023-11-13 11:09:20 +00:00
pse-pd
slip
team team: Fix use-after-free when an option instance allocation fails 2023-12-08 10:45:49 -08:00
thunderbolt
usb r8152: add vendor/device ID pair for ASUS USB-C2500 2023-12-06 10:38:38 +01:00
vmxnet3
vxlan vxlan: Cleanup IFLA_VXLAN_PORT_RANGE entry in vxlan_get_size() 2023-10-27 15:36:38 -07:00
wan
wireguard wireguard: use DEV_STATS_INC() 2023-11-19 19:48:25 +00:00
wireless wireless fixes: 2023-11-29 19:43:34 -08:00
wwan net: wwan: replace deprecated strncpy with strscpy 2023-10-20 18:15:05 -07:00
xen-netback As usual, lots of singleton and doubleton patches all over the tree and 2023-11-02 20:53:31 -10:00
amt.c net: fill in MODULE_DESCRIPTION()s under drivers/net/ 2023-10-28 11:29:28 +01:00
bareudp.c bareudp: use ports to lookup route 2023-10-26 15:21:09 +02:00
dummy.c net: fill in MODULE_DESCRIPTION()s under drivers/net/ 2023-10-28 11:29:28 +01:00
eql.c net: fill in MODULE_DESCRIPTION()s under drivers/net/ 2023-10-28 11:29:28 +01:00
geneve.c geneve: use generic function for tunnel IPv6 route lookup 2023-10-23 08:48:57 +01:00
gtp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-10-26 13:46:28 -07:00
ifb.c net: fill in MODULE_DESCRIPTION()s under drivers/net/ 2023-10-28 11:29:28 +01:00
Kconfig netkit, bpf: Add bpf programmable net device 2023-10-24 16:06:03 -07:00
LICENSE.SRC
loopback.c
macsec.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-10-12 17:07:34 -07:00
macvlan.c macvlan: Don't propagate promisc change to lower dev in passthru 2023-11-16 10:52:59 +01:00
macvtap.c net: fill in MODULE_DESCRIPTION()s under drivers/net/ 2023-10-28 11:29:28 +01:00
Makefile netkit, bpf: Add bpf programmable net device 2023-10-24 16:06:03 -07:00
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c netconsole: Attach cmdline target to dynamic target 2023-10-13 17:26:38 -07:00
netkit.c netkit: Reject IFLA_NETKIT_PEER_INFO in netkit_change_link 2023-11-27 16:07:34 -08:00
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c net: fill in MODULE_DESCRIPTION()s under drivers/net/ 2023-10-28 11:29:28 +01:00
tap.c net: fill in MODULE_DESCRIPTION()s under drivers/net/ 2023-10-28 11:29:28 +01:00
tun.c tun: prevent negative ifindex 2023-10-17 17:44:51 -07:00
veth.c net: veth: fix packet segmentation in veth_convert_skb_to_xdp_buff 2023-12-05 19:24:26 -08:00
virtio_net.c virtio_net: use u64_stats_t infra to avoid data-races 2023-10-27 10:58:15 +01:00
vrf.c net: Move {l,t,d}stats allocation to core and convert veth & vrf 2023-11-20 10:15:16 -08:00
vsockmon.c
xen-netfront.c