linux/drivers/net
Ido Schimmel 180a6a3ee6 netdevsim: fib: Fix reference count leak on route deletion failure
As part of FIB offload simulation, netdevsim stores IPv4 and IPv6 routes
and holds a reference on FIB info structures that in turn hold a
reference on the associated nexthop device(s).

In the unlikely case where we are unable to allocate memory to process a
route deletion request, netdevsim will not release the reference from
the associated FIB info structure, thereby preventing the associated
nexthop device(s) from ever being removed [1].

Fix this by scheduling a work item that will flush netdevsim's FIB table
upon route deletion failure. This will cause netdevsim to release its
reference from all the FIB info structures in its table.

Reported by Lucas Leong of Trend Micro Zero Day Initiative.

Fixes: 0ae3eb7b46 ("netdevsim: fib: Perform the route programming in a non-atomic context")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-07-29 12:21:02 +01:00
..
appletalk
arcnet
bonding net: bonding: fix use-after-free after 802.3ad slave unbind 2022-06-29 20:52:40 -07:00
caif caif_virtio: fix race between virtio_device_ready() and ndo_open() 2022-06-27 08:04:30 -04:00
can can: rcar_canfd: Add missing of_node_put() in rcar_canfd_probe() 2022-07-20 10:20:19 +02:00
dsa net: dsa: vitesse-vsc73xx: silent spi_device_id warnings 2022-07-19 12:20:40 +02:00
ethernet stmmac: dwmac-mediatek: fix resource leak in probe 2022-07-28 10:43:04 -07:00
fddi net: fddi: skfp: smt: Remove extra parameters to vararg macro 2022-05-22 23:05:56 +01:00
fjes
hamradio hamradio: 6pack: fix array-index-out-of-bounds in decode_std_command() 2022-06-17 11:39:46 +01:00
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-23 21:19:17 -07:00
ieee802154
ipa net: ipa: Fix typo 'the the' in comment 2022-07-25 10:52:28 +01:00
ipvlan
mctp
mdio
netdevsim netdevsim: fib: Fix reference count leak on route deletion failure 2022-07-29 12:21:02 +01:00
pcs net: pcs: xpcs: propagate xpcs_read error to xpcs_get_state_c37_sgmii 2022-07-21 19:01:16 -07:00
phy net: sfp: fix memory leak in sfp_probe() 2022-06-30 11:38:16 +02:00
plip
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-19 11:23:59 -07:00
slip
team
usb r8152: fix a WOL issue 2022-07-19 17:10:56 -07:00
vmxnet3 net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup() 2022-05-17 12:03:52 +02:00
vxlan net: vxlan: Fix kernel coding style 2022-05-20 17:38:27 -07:00
wan
wireguard
wireless wifi: mac80211: add gfp_t parameter to ieeee80211_obss_color_collision_notify 2022-06-29 11:43:15 +02:00
wwan wwan: iosm: use a flexible array rather than allocate short objects 2022-05-20 17:56:50 -07:00
xen-netback xen/netback: avoid entering xenvif_rx_next_skb() with an empty rx queue 2022-07-14 10:12:12 -07:00
amt.c amt: do not use amt->nr_tunnels outside of lock 2022-07-19 12:37:02 +02:00
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig wireguard: Kconfig: select CRYPTO_CHACHA_S390 2022-07-06 20:04:06 -07:00
LICENSE.SRC
loopback.c net: loopback: enable BIG TCP packets 2022-05-16 10:18:56 +01:00
macsec.c net: macsec: fix potential resource leak in macsec_add_rxsa() and macsec_add_txsa() 2022-07-25 11:51:05 +01:00
macvlan.c
macvtap.c
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 net: sungem_phy: Add of_node_put() for reference returned by of_get_parent() 2022-07-21 19:04:19 -07:00
tap.c
thunderbolt.c
tun.c net: tun: avoid disabling NAPI twice 2022-06-30 11:34:10 -07:00
veth.c veth: Add updating of trans_start 2022-06-17 11:38:09 +01:00
virtio_net.c virtio-net: fix the race between refill work and close 2022-07-27 13:20:44 +01:00
vrf.c
vsockmon.c
xen-netfront.c xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() 2022-07-01 10:01:23 +02:00