linux_dsm_epyc7002/drivers/net
Yunsheng Lin d1a37dedcf net: hns3: fix a use after free problem in hns3_nic_maybe_stop_tx()
Currently, hns3_nic_maybe_stop_tx() uses skb_copy() to linearize a
SKB if the BD num required by the SKB does not meet the hardware
limitation, and it linearizes the SKB by allocating a new linearized SKB
and freeing the old SKB, if hns3_nic_maybe_stop_tx() returns -EBUSY
because there are no enough space in the ring to send the linearized
skb to hardware, the sch_direct_xmit() still hold reference to old SKB
and try to retransmit the old SKB when dev_hard_start_xmit() return
TX_BUSY, which may cause use after freed problem.

This patch fixes it by using __skb_linearize() to linearize the
SKB in hns3_nic_maybe_stop_tx().

Fixes: 51e8439f34 ("net: hns3: add 8 BD limit for tx flow")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-05 14:42:43 -08:00
..
appletalk
arcnet
bonding
caif Driver core patches for 5.5-rc1 2019-11-27 11:06:20 -08:00
can can: xilinx_can: Fix usage of skb memory 2019-12-03 11:15:08 +01:00
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-25 14:57:26 -08:00
ethernet net: hns3: fix a use after free problem in hns3_nic_maybe_stop_tx() 2019-12-05 14:42:43 -08:00
fddi
fjes
hamradio
hippi
hyperv - Support for new VMBus protocols (Andrea Parri). 2019-11-30 14:50:51 -08:00
ieee802154 drivers: net: Fix Kconfig indentation, continued 2019-11-21 11:54:09 -08:00
ipvlan
netdevsim
phy net: sfp: fix hwmon 2019-12-04 16:57:52 -08:00
plip
ppp compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
slip slip: Fix use-after-free Read in slip_open 2019-11-25 11:02:52 -08:00
team
usb net: usb: aqc111: Use the correct style for SPDX License Identifier 2019-11-27 11:27:01 -08:00
vmxnet3
wan
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-27 17:17:40 -08:00
xen-netback
dummy.c
eql.c
geneve.c net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup 2019-12-04 12:27:13 -08:00
gtp.c
ifb.c
Kconfig drivers: net: Fix Kconfig indentation, continued 2019-11-21 11:54:09 -08:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c macvlan: schedule bc_work even if error 2019-11-25 10:54:22 -08:00
macvtap.c
Makefile
mdio.c
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
veth.c
virtio_net.c bpf: Convert bpf_prog refcnt to atomic64_t 2019-11-18 11:41:59 +01:00
vrf.c
vsockmon.c
vxlan.c net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup 2019-12-04 12:27:13 -08:00
xen-netfront.c