diff options
| author | 2026-10-26 14:46:15 +0100 | |
|---|---|---|
| committer | 2026-10-27 15:22:46 +0100 | |
| commit | b4a7180558eb3cd8affa1e240b22171425bdfcb4 (patch) | |
| tree | 24ec91a8789b440d6cd57211b919ee00a5a103f4 /scripts/Makefile.thinlto | |
| parent | ixgbe: reserve TX timestamp after skb preparation (diff) | |
net: lan966x: do not inject uninitialised bytes past skb->len
lan966x_port_ifh_xmit() writes the frame to the injection FIFO one
32-bit word at a time, and pads frames shorter than 60 bytes with zero
words.
Before this patch, the last word is loaded whole even when skb->len is
not a multiple of four, so 1 to 3 bytes past the end of the frame are
read. For a frame shorter than 60 bytes those bytes are also
transmitted, as VLD_BYTES marks the whole last word valid and the
padding starts at the next word.
Write the trailing bytes from a zeroed word. The number of words written
and VLD_BYTES are unchanged.
Found by an AI code review agent. Reproduced on a lan9668 board with
register injection, by sending a
57 byte frame and capturing it on the link partner: byte 57 of the
padded frame was not zero. With the fix all padding bytes are zero.
Fixes: d28d6d2e37d1 ("net: lan966x: add port module support")
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261026-lan966x-inject-tail-bytes-v1-1-51d599a48313@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
