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] [thread-next>] [day] [month] [year] [list]
Message-ID: <195d0388-57ca-4a1a-bc92-65da899443ab@nvidia.com>
Date: Wed, 30 Jul 2025 14:06:22 +0300
From: Gal Pressman <gal@...dia.com>
To: cpaasch@...nai.com, Saeed Mahameed <saeedm@...dia.com>,
 Tariq Toukan <tariqt@...dia.com>, Mark Bloch <mbloch@...dia.com>,
 Leon Romanovsky <leon@...nel.org>, 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>,
 Amir Vadai <amirv@...lanox.com>
Cc: netdev@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH net] net/mlx5: Correctly set gso_segs when LRO is used

On 29/07/2025 21:34, Christoph Paasch via B4 Relay wrote:
> From: Christoph Paasch <cpaasch@...nai.com>
> 
> When gso_segs is left at 0, a number of assumptions will end up being
> incorrect throughout the stack.
> 
> For example, in the GRO-path, we set NAPI_GRO_CB()->count to gso_segs.
> So, if a non-LRO'ed packet followed by an LRO'ed packet is being
> processed in GRO, the first one will have NAPI_GRO_CB()->count set to 1 and
> the next one to 0 (in dev_gro_receive()).
> Since commit 531d0d32de3e
> ("net/mlx5: Correctly set gso_size when LRO is used")
> these packets will get merged (as their gso_size now matches).
> So, we end up in gro_complete() with NAPI_GRO_CB()->count == 1 and thus
> don't call inet_gro_complete(). Meaning, checksum-validation in
> tcp_checksum_complete() will fail with a "hw csum failure".
> 
> Even before the above mentioned commit, incorrect gso_segs means that other
> things like TCP's accounting of incoming packets (tp->segs_in,
> data_segs_in, rcv_ooopack) will be incorrect. Which means that if one
> does bytes_received/data_segs_in, the result will be bigger than the
> MTU.
> 
> Fix this by initializing gso_segs correctly when LRO is used.
> 
> Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files")

Maybe we should put an additional Fixes line for the gso_size patch?
It doesn't directly fix it, but it will clearly emphasize the importance
of picking up this patch together with the other one.

> Reported-by: Gal Pressman <gal@...dia.com>
> Closes: https://lore.kernel.org/netdev/6583783f-f0fb-4fb1-a415-feec8155bc69@nvidia.com/
> Signed-off-by: Christoph Paasch <cpaasch@...nai.com>

Thanks Christoph,
Reviewed-by: Gal Pressman <gal@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ