From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: jianqiang wang <wjq.sec@gmail.com>
Subject: [PATCH v2 0/7] net: do not read past receive buffer
Date: Mon, 27 May 2024 12:27:16 +0200 [thread overview]
Message-ID: <20240527102723.3504270-1-s.hauer@pengutronix.de> (raw)
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 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 (7):
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: 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 | 14 ++++------
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 | 15 ++++++-----
drivers/net/tap.c | 4 +--
drivers/net/usb/usbnet.c | 8 +++---
drivers/net/virtio.c | 6 ++---
include/net.h | 2 +-
33 files changed, 115 insertions(+), 171 deletions(-)
--
2.39.2
next reply other threads:[~2024-05-27 10:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 10:27 Sascha Hauer [this message]
2024-05-27 10:27 ` [PATCH v2 1/7] net: cs8900: simplify buffer read loop Sascha Hauer
2024-05-27 10:27 ` [PATCH v2 2/7] net: cs8900: do not read past the receive buffer Sascha Hauer
2024-05-27 10:27 ` [PATCH v2 3/7] net: ks8851_mll: " Sascha Hauer
2024-05-27 10:27 ` [PATCH v2 4/7] net: liteeth: " Sascha Hauer
2024-05-27 12:29 ` Jules Maselbas
2024-05-27 10:27 ` [PATCH v2 5/7] net: smc911x: " Sascha Hauer
2024-05-27 12:27 ` Jules Maselbas
2024-05-27 10:27 ` [PATCH v2 6/7] net: ks8851_mll: drop return value from ks8851_rx_frame() Sascha Hauer
2024-05-27 10:27 ` [PATCH v2 7/7] net: let net rx hook return void Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240527102723.3504270-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=wjq.sec@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox