]> Git Repo - linux.git/commit
net: ethernet: lantiq_etop: fix memory disclosure
authorAleksander Jan Bajkowski <[email protected]>
Mon, 23 Sep 2024 21:49:49 +0000 (23:49 +0200)
committerPaolo Abeni <[email protected]>
Tue, 1 Oct 2024 08:58:07 +0000 (10:58 +0200)
commit45c0de18ff2dc9af01236380404bbd6a46502c69
tree173be92066ce05774ccfd47bb0e1cc36c847a096
parente609c959a939660c7519895f853dfa5624c6827a
net: ethernet: lantiq_etop: fix memory disclosure

When applying padding, the buffer is not zeroed, which results in memory
disclosure. The mentioned data is observed on the wire. This patch uses
skb_put_padto() to pad Ethernet frames properly. The mentioned function
zeroes the expanded buffer.

In case the packet cannot be padded it is silently dropped. Statistics
are also not incremented. This driver does not support statistics in the
old 32-bit format or the new 64-bit format. These will be added in the
future. In its current form, the patch should be easily backported to
stable versions.

Ethernet MACs on Amazon-SE and Danube cannot do padding of the packets
in hardware, so software padding must be applied.

Fixes: 504d4721ee8e ("MIPS: Lantiq: Add ethernet driver")
Signed-off-by: Aleksander Jan Bajkowski <[email protected]>
Reviewed-by: Jacob Keller <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
drivers/net/ethernet/lantiq_etop.c
This page took 0.086716 seconds and 4 git commands to generate.