mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v3 0/9] net: do not read past receive buffer
@ 2024-05-28  8:57 Sascha Hauer
  2024-05-28  8:57 ` [PATCH v3 1/9] net: cs8900: simplify buffer read loop Sascha Hauer
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Sascha Hauer @ 2024-05-28  8:57 UTC (permalink / raw)
  To: Barebox List; +Cc: jianqiang wang

Several network drivers read overlong packets without checking if the
buffer they read into is large enough. Discard the packets instead
of writing past the buffer.

Changes since v2:
- Add patch to fix amount of words read from RX FIFO
- Fix wrong len printing in liteeth
- Fix wrong too long packet check in smc911x

Changes since v1:
- Do not call net_receive() when we decided to discard a packet
- Add patch to let network device receive hook return void

Sascha Hauer (9):
  net: cs8900: simplify buffer read loop
  net: cs8900: do not read past the receive buffer
  net: ks8851_mll: do not read past the receive buffer
  net: liteeth: do not read past the receive buffer
  net: liteeth: do not set len to 0 before printing it
  net: smc911x: Fix amount of words read from RX FIFO
  net: smc911x: do not read past the receive buffer
  net: ks8851_mll: drop return value from ks8851_rx_frame()
  net: let net rx hook return void

 drivers/net/ag71xx.c          |  4 +--
 drivers/net/ar231x.c          |  3 +--
 drivers/net/arc_emac.c        |  4 +--
 drivers/net/at91_ether.c      |  6 ++---
 drivers/net/bcmgenet.c        |  6 ++---
 drivers/net/cpsw.c            |  4 +--
 drivers/net/cs8900.c          | 19 +++++++-------
 drivers/net/davinci_emac.c    | 11 +++-----
 drivers/net/designware.c      |  9 ++-----
 drivers/net/designware_eqos.c |  6 ++---
 drivers/net/dm9k.c            | 12 ++++-----
 drivers/net/dsa.c             |  6 ++---
 drivers/net/e1000/main.c      |  5 +---
 drivers/net/efi-snp.c         |  8 +++---
 drivers/net/enc28j60.c        |  4 +--
 drivers/net/ep93xx.c          |  9 +------
 drivers/net/ethoc.c           | 10 +++-----
 drivers/net/fec_imx.c         |  8 +++---
 drivers/net/fec_mpc5200.c     |  5 ++--
 drivers/net/fsl-fman.c        |  6 +----
 drivers/net/fsl_enetc.c       |  6 ++---
 drivers/net/gianfar.c         |  6 ++---
 drivers/net/ks8851_mll.c      | 48 +++++++++++++++++++++++++----------
 drivers/net/liteeth.c         | 17 +++++--------
 drivers/net/macb.c            | 12 +++------
 drivers/net/r8169_main.c      |  7 +----
 drivers/net/rtl8139.c         |  6 ++---
 drivers/net/smc91111.c        |  7 ++---
 drivers/net/smc911x.c         | 20 +++++++--------
 drivers/net/tap.c             |  4 +--
 drivers/net/usb/usbnet.c      |  8 +++---
 drivers/net/virtio.c          |  6 ++---
 include/net.h                 |  2 +-
 33 files changed, 116 insertions(+), 178 deletions(-)

-- 
2.39.2




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-05-28 14:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-28  8:57 [PATCH v3 0/9] net: do not read past receive buffer Sascha Hauer
2024-05-28  8:57 ` [PATCH v3 1/9] net: cs8900: simplify buffer read loop Sascha Hauer
2024-05-28  8:57 ` [PATCH v3 2/9] net: cs8900: do not read past the receive buffer Sascha Hauer
2024-05-28  8:58 ` [PATCH v3 3/9] net: ks8851_mll: " Sascha Hauer
2024-05-28  8:58 ` [PATCH v3 4/9] net: liteeth: " Sascha Hauer
2024-05-28  8:58 ` [PATCH v3 5/9] net: liteeth: do not set len to 0 before printing it Sascha Hauer
2024-05-28  8:58 ` [PATCH v3 6/9] net: smc911x: Fix amount of words read from RX FIFO Sascha Hauer
2024-05-28  8:58 ` [PATCH v3 7/9] net: smc911x: do not read past the receive buffer Sascha Hauer
2024-05-28 13:29   ` Jules Maselbas
2024-05-28 14:23     ` [PATCH] fixup! " Sascha Hauer
2024-05-28 14:26     ` [PATCH v3 7/9] " Sascha Hauer
2024-05-28 14:37       ` Jules Maselbas
2024-05-28  8:58 ` [PATCH v3 8/9] net: ks8851_mll: drop return value from ks8851_rx_frame() Sascha Hauer
2024-05-28  8:58 ` [PATCH v3 9/9] net: let net rx hook return void Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox