linux/drivers/net/ethernet
Sven Van Asbroeck 3bc41d6d27 lan743x: fix ethernet frame cutoff issue
The ethernet frame length is calculated incorrectly. Depending on
the value of RX_HEAD_PADDING, this may result in ethernet frames
that are too short (cut off at the end), or too long (garbage added
to the end).

Fix by calculating the ethernet frame length correctly. For added
clarity, use the ETH_FCS_LEN constant in the calculation.

Many thanks to Heiner Kallweit for suggesting this solution.

Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
Fixes: 3e21a10fde ("lan743x: trim all 4 bytes of the FCS; not just 2")
Link: https://lore.kernel.org/lkml/20210408172353.21143-1-TheSven73@gmail.com/
Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
Link: https://lore.kernel.org/r/20210409003904.8957-1-TheSven73@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-04-09 12:49:38 -07:00
..
3com isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
8390
adaptec
aeroflex
agere
alacritech
allwinner net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function 2020-12-16 11:37:31 -08:00
alteon
altera
amazon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-02-10 13:30:12 -08:00
amd pcnet32: Use pci_resource_len to validate PCI resource 2021-04-06 16:30:17 -07:00
apm
apple
aquantia net: ethernet: aquantia: Handle error cleanup of start on open 2021-02-11 14:38:06 -08:00
arc
atheros ethernet: alx: fix order of calls on resume 2021-03-05 15:05:33 -08:00
broadcom net: broadcom: bcm4908enet: Fix a double free in bcm4908_enet_dma_alloc 2021-04-06 16:15:21 -07:00
brocade
cadence net: macb: restore cmp registers on resume path 2021-04-02 14:29:49 -07:00
calxeda
cavium net/ethernet: convert to use module_platform_driver in octeon_mgmt.c 2021-01-29 19:02:43 -08:00
chelsio cxgb4: avoid collecting SGE_QBASE regs during traffic 2021-03-29 16:16:14 -07:00
cirrus
cisco net: remove ndo_udp_tunnel_* callbacks 2021-01-07 12:53:29 -08:00
cortina
davicom net: davicom: Use platform_get_irq_optional() 2021-03-08 12:01:58 -08:00
dec
dlink
emulex net: remove ndo_udp_tunnel_* callbacks 2021-01-07 12:53:29 -08:00
ezchip
faraday ftgmac100: Restart MAC HW once 2021-03-12 16:54:07 -08:00
freescale gianfar: Handle error code at MAC address change 2021-03-29 13:45:41 -07:00
fujitsu
google
hisilicon net: hns3: clear VF down state bit before request link status 2021-04-06 16:40:06 -07:00
huawei
i825xx drivers: net: ethernet: i825xx: Fix couple of spellings in the file ether1.c 2021-02-04 19:07:55 -08:00
ibm Merge git://git.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2021-03-09 17:15:56 -08:00
intel ice: fix memory leak of aRFS after resuming from suspend 2021-04-08 10:21:37 -07:00
marvell octeontx2-af: Fix memory leak of object buf 2021-03-24 12:33:06 -07:00
mediatek net: ethernet: mtk-star-emac: fix wrong unmap in RX handling 2021-03-02 15:28:07 -08:00
mellanox ethtool: Remove link_mode param and derive link params from driver 2021-04-07 14:53:04 -07:00
micrel net: ks8851: remove definition of DEBUG 2021-01-15 17:53:29 -08:00
microchip lan743x: fix ethernet frame cutoff issue 2021-04-09 12:49:38 -07:00
moxa
mscc net: mscc: ocelot: properly reject destination IP keys in VCAP IS1 2021-03-04 14:16:24 -08:00
myricom ethernet: myri10ge: Fix a use after free in myri10ge_sw_tso 2021-03-29 13:41:17 -07:00
natsemi net/sonic: Fix some resource leaks in error handling paths 2021-01-05 15:59:20 -08:00
neterion net: vxget: clean up sparse warnings 2020-12-14 19:18:11 -08:00
netronome nfp: flower: ignore duplicate merge hints from FW 2021-03-30 16:58:03 -07:00
ni net: nixge: fix spelling mistake in Kconfig: "Instuments" -> "Instruments" 2020-12-17 10:54:31 -08:00
nvidia
nxp
oki-semi
packetengines
pasemi
pensando ionic: linearize tso skb with too many frags 2021-03-17 11:27:30 -07:00
qlogic net/qlcnic: Fix a use after free in qlcnic_83xx_get_minidump_template 2021-03-11 18:08:14 -08:00
qualcomm net: qualcomm: rmnet: Fix rx_handler for non-linear skbs 2021-02-06 11:28:45 -08:00
rdc
realtek r8169: fix DMA being used after buffer free if WoL is enabled 2021-03-20 19:01:41 -07:00
renesas sh_eth: fix TRSCER mask for R7S9210 2021-03-01 13:22:34 -08:00
rocker net: switchdev: pass flags and mask to both {PRE_,}BRIDGE_FLAGS attributes 2021-02-12 17:08:04 -08:00
samsung net: phy: rename PHY_IGNORE_INTERRUPT to PHY_MAC_INTERRUPT 2021-02-15 15:20:49 -08:00
seeq
sfc sfc: reduce the number of requested xdp ev queues 2021-01-22 19:16:45 -08:00
sgi
silan
sis
smsc net: smsc911x: Make Runtime PM handling more fine-grained 2021-01-19 17:46:39 -08:00
socionext netsec: restore phy power state after controller reset 2021-03-18 11:22:04 -07:00
stmicro net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes 2021-03-19 13:44:06 -07:00
sun sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count 2021-03-05 13:00:38 -08:00
synopsys net: dwc-xlgmac: Fix spelling mistake in function name 2021-02-06 11:37:01 -08:00
tehuti net: tehuti: fix error return code in bdx_probe() 2021-03-05 12:59:32 -08:00
ti Devicetree updates for v5.12: 2021-02-22 10:05:12 -08:00
toshiba net: ethernet: toshiba: spider_net: Document a whole bunch of function parameters 2021-01-16 18:13:28 -08:00
tundra
via
wiznet
xilinx net: axienet: allow setups without MDIO 2021-03-25 16:49:40 -07:00
xircom
xscale net: ixp4xx_eth: Use DEFINE_SPINLOCK() for spinlock 2021-01-05 15:43:41 -08:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c net: ethernet: Fix memleak in ethoc_probe 2020-12-23 12:28:53 -08:00
fealnx.c
jme.c
jme.h
Kconfig net: remove aurora nb8800 driver 2021-01-21 19:48:38 -08:00
korina.c net: korina: fix return value 2020-12-16 15:01:07 -08:00
lantiq_etop.c
lantiq_xrx200.c
Makefile net: remove aurora nb8800 driver 2021-01-21 19:48:38 -08:00