mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] can: populate ndo_change_mtu() to prevent buffer overflow
@ 2025-09-18  9:00 Vincent Mailhol
  2025-09-18  9:00 ` [PATCH 1/4] can: etas_es58x: " Vincent Mailhol
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Vincent Mailhol @ 2025-09-18  9:00 UTC (permalink / raw)
  To: Marc Kleine-Budde, Oliver Hartkopp
  Cc: Arunachalam Santhanam, Akshay Bhat, Wolfgang Grandegger,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard,
	Gerhard Bertelsmann, Yasushi SHOJI,
	Remigiusz Kołłątaj, linux-can, linux-kernel,
	linux-arm-kernel, linux-sunxi, Vincent Mailhol

Four drivers, namely etas_es58x, hi311x, sun4i_can and mcba_usb forgot
to populate their net_device_ops->ndo_change_mtu(). Because of that,
the user is free to configure any MTU on these interfaces.

This can be abused by an attacker who could craft some skbs and send
them through PF_PACKET to perform a buffer overflow of up to 247 bytes
in each of these drivers.

This series contains four patches, one for each of the drivers, to add
the missing ndo_change_mtu() callback. The descriptions contain
detailed explanations of how the buffer overflow could be triggered.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
Vincent Mailhol (4):
      can: etas_es58x: populate ndo_change_mtu() to prevent buffer overflow
      can: hi311x: populate ndo_change_mtu() to prevent buffer overflow
      can: sun4i_can: populate ndo_change_mtu() to prevent buffer overflow
      can: mcba_usb: populate ndo_change_mtu() to prevent buffer overflow

 drivers/net/can/spi/hi311x.c                | 1 +
 drivers/net/can/sun4i_can.c                 | 1 +
 drivers/net/can/usb/etas_es58x/es58x_core.c | 3 ++-
 drivers/net/can/usb/mcba_usb.c              | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)
---
base-commit: f83ec76bf285bea5727f478a68b894f5543ca76e
change-id: 20250918-can-fix-mtu-b521e1ed1a29

Best regards,
-- 
Vincent Mailhol <mailhol@kernel.org>


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

end of thread, other threads:[~2025-09-19 17:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-18  9:00 [PATCH 0/4] can: populate ndo_change_mtu() to prevent buffer overflow Vincent Mailhol
2025-09-18  9:00 ` [PATCH 1/4] can: etas_es58x: " Vincent Mailhol
2025-09-18  9:00 ` [PATCH 2/4] can: hi311x: " Vincent Mailhol
2025-09-18  9:00 ` [PATCH 3/4] can: sun4i_can: " Vincent Mailhol
2025-09-18  9:00 ` [PATCH 4/4] can: mcba_usb: " Vincent Mailhol
2025-09-19 17:04 ` [PATCH 0/4] can: " Marc Kleine-Budde

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

all inboxes | Powered by JetHome®