lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ac0a8cd8-b1bc-4cdb-a199-cc92c748b84b@altera.com>
Date: Sat, 18 Oct 2025 07:36:26 +0530
From: "G Thomas, Rohan" <rohan.g.thomas@...era.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Maxime Coquelin <mcoquelin.stm32@...il.com>,
 Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Jose Abreu <Jose.Abreu@...opsys.com>,
 Rohan G Thomas <rohan.g.thomas@...el.com>,
 Boon Khai Ng <boon.khai.ng@...era.com>, netdev@...r.kernel.org,
 linux-stm32@...md-mailman.stormreply.com,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 Matthew Gerlach <matthew.gerlach@...era.com>
Subject: Re: [PATCH net v3 2/3] net: stmmac: Consider Tx VLAN offload tag
 length for maxSDU

Hi Russell,

Thanks, I'll update the commit message.

On 10/17/2025 6:14 PM, Russell King (Oracle) wrote:
> On Fri, Oct 17, 2025 at 02:11:20PM +0800, Rohan G Thomas via B4 Relay wrote:
>> From: Rohan G Thomas <rohan.g.thomas@...era.com>
>>
>> On hardware with Tx VLAN offload enabled, add the VLAN tag length to
>> the skb length before checking the Qbv maxSDU if Tx VLAN offload is
>> requested for the packet. Add 4 bytes for 802.1Q tag.
> 
> This needs to say _why_. Please describe the problem that the current
> code suffers from. (e.g. the packet becomes too long for the queue to
> handle, which causes it to be dropped - which is my guess.)
> 
> We shouldn't be guessing the reasons behind changes.
> 

Queue maxSDU requirement of 802.1 Qbv standard requires mac to drop
packets that exceeds maxSDU length and maxSDU doesn't include preamble,
destination and source address, or FCS but includes ethernet type and 
VLAN header.

On hardware with Tx VLAN offload enabled, VLAN header length is not
included in the skb->len, when Tx VLAN offload is requested. This leads
to incorrect length checks and allows transmission of oversized packets.
Add the VLAN_HLEN to the skb->len before checking the Qbv maxSDU if Tx
VLAN offload is requested for the packet.

This patch ensures that the VLAN header length (`VLAN_HLEN`) is
accounted for in the SDU length check when VLAN offload is requested.

Best Regards,
Rohan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ