From: Aleksander Jan Bajkowski <hidden> Date: 2024-09-23 21:49:54
Changes in v3:
- back to the use of the temporary 'len' variable
Changes in v2:
- clarified questions about statistics in the commit description
- rebased on current master
Aleksander Jan Bajkowski (1):
net: ethernet: lantiq_etop: fix memory disclosure
drivers/net/ethernet/lantiq_etop.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
2.39.5
From: Aleksander Jan Bajkowski <hidden> Date: 2024-09-23 21:50:04
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 <redacted>
---
drivers/net/ethernet/lantiq_etop.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: "Keller, Jacob E" <jacob.e.keller@intel.com> Date: 2024-09-23 21:54:19
-----Original Message-----
From: Aleksander Jan Bajkowski <redacted>
Sent: Monday, September 23, 2024 2:50 PM
To: davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
pabeni@redhat.com; olek2@wp.pl; horms@kernel.org; Keller, Jacob E
[off-list ref]; john@phrozen.org; ralf@linux-mips.org;
ralph.hempel@lantiq.com; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: [PATCH net v3 1/1] 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 <redacted>
---
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
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 <redacted>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Thanks for taking in the suggsetion!
--
Florian
From: Paolo Abeni <pabeni@redhat.com> Date: 2024-10-01 08:57:44
On 9/23/24 23:49, Aleksander Jan Bajkowski wrote:
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 <redacted>
For future submissions, please avoid adding the cover letter in case of
a single patch.
Thanks,
Paolo
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni [off-list ref]:
On Mon, 23 Sep 2024 23:49:48 +0200 you wrote:
Changes in v3:
- back to the use of the temporary 'len' variable
Changes in v2:
- clarified questions about statistics in the commit description
- rebased on current master
[...]