mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 00/10] net: prevent buffer overflows in UDP packets
@ 2026-04-02  6:36 Sascha Hauer
  2026-04-02  6:36 ` [PATCH 01/10] net: add net_eth_to_udp() helper for validated UDP extraction Sascha Hauer
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Sascha Hauer @ 2026-04-02  6:36 UTC (permalink / raw)
  To: BAREBOX; +Cc: Claude Opus 4.6

Our UDP handlers all use a UDP packets length without checking if it
fits into the incoming ethernet frame. Create a net_eth_to_udp() helper
which does the bounds checking and use it throughout the code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Sascha Hauer (10):
      net: add net_eth_to_udp() helper for validated UDP extraction
      fs: tftp: use net_eth_to_udp() for packet parsing
      net: dhcp: use net_eth_to_udp() for packet parsing
      fs: nfs: use net_eth_to_udp() for packet parsing
      net: dns: use net_eth_to_udp() for packet parsing
      net: sntp: use net_eth_to_udp() for packet parsing
      net: netconsole: use net_eth_to_udp() for packet parsing
      net: fastboot: use net_eth_to_udp() for packet parsing
      net: fastboot: stop using net_eth_to_udp_payload() for PACKET_SIZE
      net: remove unused net_eth_to_udp{hdr,_payload,len}() helpers

 fs/nfs.c         | 11 +++++++----
 fs/tftp.c        |  9 +++++----
 include/net.h    | 21 +++++++--------------
 net/dhcp.c       | 16 +++++++++-------
 net/dns.c        |  9 ++++++---
 net/fastboot.c   | 25 ++++++++++++++++---------
 net/net.c        | 40 ++++++++++++++++++++++++++++++++++++++++
 net/netconsole.c |  7 +++++--
 net/sntp.c       | 14 +++++++++-----
 9 files changed, 104 insertions(+), 48 deletions(-)
---
base-commit: 0933e8f2ebf0d91dfcf177a4e4292b02921a53f1
change-id: 20260402-net-eth-do-udp-327f4e65ddd5

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

end of thread, other threads:[~2026-04-02  7:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-02  6:36 [PATCH 00/10] net: prevent buffer overflows in UDP packets Sascha Hauer
2026-04-02  6:36 ` [PATCH 01/10] net: add net_eth_to_udp() helper for validated UDP extraction Sascha Hauer
2026-04-02  6:36 ` [PATCH 02/10] fs: tftp: use net_eth_to_udp() for packet parsing Sascha Hauer
2026-04-02  6:36 ` [PATCH 03/10] net: dhcp: " Sascha Hauer
2026-04-02  6:36 ` [PATCH 04/10] fs: nfs: " Sascha Hauer
2026-04-02  6:36 ` [PATCH 05/10] net: dns: " Sascha Hauer
2026-04-02  6:36 ` [PATCH 06/10] net: sntp: " Sascha Hauer
2026-04-02  6:36 ` [PATCH 07/10] net: netconsole: " Sascha Hauer
2026-04-02  6:36 ` [PATCH 08/10] net: fastboot: " Sascha Hauer
2026-04-02  6:36 ` [PATCH 09/10] net: fastboot: stop using net_eth_to_udp_payload() for PACKET_SIZE Sascha Hauer
2026-04-02  6:36 ` [PATCH 10/10] net: remove unused net_eth_to_udp{hdr,_payload,len}() helpers Sascha Hauer

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