TencentOS-kernel/drivers/net
mengensun 7a2ee8ca8f virtio-net: check copy length in xdp_linearize_page
at swithing from no-xdp-attached to xdp-attached, some ring elem
may be added to vring before we attach xdp prog, thoes ring elem
length is variable according to EWMA

while xdp_linearize_page assume ring elem length was aways shorter
then PAGE_SIZE - VIRTIO_XDP_HEADROOM, EWMA may giving a ring elem
bigger then PAGE_SIZE - VIRTIO_XDP_HEADROOM, which make the memory
dirty after the page allocated by xdp_linearize_page

fix it by checking length before really copy, and dropped the current
frame if checking failed, because length of ring elem which is add to
ring buffer after xdp attached is aways shorter
then PAGE_SIZE - VIRTIO_XDP_HEADROOM so here we dropped frame as most
as vring length.

upstream kernel have not repaired this, got it by code review,so, here
repair this by Conservativly dropped frame but not let the system dump

Signed-off-by: mengensun<mengensun@tencent.com>
Reviewed-by: mungerjiang<mungerjiang@tencent.com>
Reviewed-by: imagedong<imagedong@tencent.com>
2021-12-20 11:46:29 +08:00
..
appletalk Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arcnet Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
bonding net: bonding proc file 2021-03-16 16:43:58 +08:00
caif Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
can drivers: net: fix memory leak in peak_usb_create_dev 2021-05-20 16:07:04 +08:00
dsa net: phy: marvell: fix detection of PHY on Topaz switches 2021-05-20 16:07:14 +08:00
ethernet net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send 2021-05-20 16:08:00 +08:00
fddi FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR 2021-05-20 16:07:40 +08:00
fjes Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hamradio yam: fix possible memory leak in yam_init_driver 2021-03-16 16:30:06 +08:00
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2021-03-16 16:32:23 +08:00
hyperv hv_netvsc: Remove "unlikely" from netvsc_select_queue 2021-03-16 16:36:11 +08:00
ieee802154 drivers: net: fix memory leak in atusb_probe 2021-05-20 16:07:03 +08:00
ipvlan ipvlan: fix device features 2021-03-16 16:34:45 +08:00
netdevsim netdevsim: init u64 stats for 32bit hardware 2021-04-12 12:52:59 +08:00
phy net: phy: intel-xway: enable integrated led functions 2021-05-20 16:08:00 +08:00
plip Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ppp pppoe: only process PADT targeted at local interfaces 2021-03-16 16:27:47 +08:00
slip Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
team team: protect features update by RCU to avoid deadlock 2021-04-12 12:51:48 +08:00
usb net: usb: ax88179_178a: initialize local variables before use 2021-05-20 16:07:17 +08:00
vmxnet3 vmxnet3: use correct tcp hdr length when packet is encapsulated 2021-03-16 16:33:49 +08:00
wan net: lapbether: Prevent racing when checking whether the netif is running 2021-05-20 16:07:55 +08:00
wimax staging: wimax/i2400m: fix byte-order issue 2021-05-20 16:07:23 +08:00
wireless ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock 2021-05-20 16:08:00 +08:00
xen-netback xen-netback: Check for hotplug-status existence before watching 2021-05-20 16:07:15 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
LICENSE.SRC Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Space.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dummy.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
eql.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
geneve.c net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb 2021-05-20 16:08:00 +08:00
gtp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-04-12 12:52:42 +08:00
ifb.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
loopback.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
macsec.c macsec: avoid use-after-free in macsec_handle_frame() 2021-03-16 16:37:58 +08:00
macvlan.c macvlan: validate setting of multiple remote source MAC addresses 2021-03-16 16:35:08 +08:00
macvtap.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mdio.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mii.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
net_failover.c net_failover: fixed rollback in net_failover_open() 2021-03-16 16:28:54 +08:00
netconsole.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
nlmon.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ntb_netdev.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rionet.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sb1000.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sungem_phy.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tap.c net: fix dev_ifsioc_locked() race condition 2021-04-12 12:52:45 +08:00
thunderbolt.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tun.c net: tun: set tun->dev->addr_len during TUNSETLINK processing 2021-05-20 16:07:03 +08:00
veth.c veth: Store queue_mapping independently of XDP prog presence 2021-04-12 12:53:26 +08:00
virtio_net.c virtio-net: check copy length in xdp_linearize_page 2021-12-20 11:46:29 +08:00
vrf.c vrf: packets with lladdr src needs dst at input with orig_iif when needs strict 2021-03-16 16:42:16 +08:00
vsockmon.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vxlan.c vxlan: move debug check after netdev unregister 2021-04-12 12:52:31 +08:00
xen-netfront.c xen-netfront: fix potential deadlock in xennet_remove() 2021-03-16 16:32:57 +08:00