Re: [PATCH] net: dsa: microchip: linearize skb for tail-tagging switches

From: Andrew Lunn
Date: Fri May 09 2025 - 08:31:52 EST


On Fri, May 09, 2025 at 09:18:19AM +0200, Jakob Unterwurzacher wrote:
> The pointer arithmentic for accessing the tail tag does not
> seem to handle nonlinear skbs.
>
> For nonlinear skbs, it reads uninitialized memory inside the
> skb headroom, essentially randomizing the tag, breaking user
> traffic.

Both tag_rtl8_4.c & tag_trailer.c also linearize, so i would say this
is correct.

What is interesting is that both xrs700x_rcv() and
sja1110_rcv_inband_control_extension() also don't call
skb_linearize().

Vladimir? George?

> Tested on v6.12.19 and today's master (d76bb1ebb5587f66b).

Please read:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

This patch should be for net, and you need a Fixes: tag.

Andrew

---
pw-bot: cr