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: <66e30905d46bc_15199d2945c@willemb.c.googlers.com.notmuch>
Date: Thu, 12 Sep 2024 11:30:13 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Sudeep Holla <sudeep.holla@....com>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: netdev@...r.kernel.org, 
 davem@...emloft.net, 
 kuba@...nel.org, 
 edumazet@...gle.com, 
 pabeni@...hat.com, 
 stable@...r.kernel.org, 
 nsz@...t70.net, 
 mst@...hat.com, 
 jasowang@...hat.com, 
 yury.khrustalev@....com, 
 broonie@...nel.org, 
 Sudeep Holla <sudeep.holla@....com>, 
 Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net v2] net: tighten bad gso csum offset check in
 virtio_net_hdr

Sudeep Holla wrote:
> On Tue, Sep 10, 2024 at 05:35:35PM -0400, Willem de Bruijn wrote:
> > From: Willem de Bruijn <willemb@...gle.com>
> > 
> > The referenced commit drops bad input, but has false positives.
> > Tighten the check to avoid these.
> > 
> > The check detects illegal checksum offload requests, which produce
> > csum_start/csum_off beyond end of packet after segmentation.
> > 
> > But it is based on two incorrect assumptions:
> > 
> > 1. virtio_net_hdr_to_skb with VIRTIO_NET_HDR_GSO_TCP[46] implies GSO.
> > True in callers that inject into the tx path, such as tap.
> > But false in callers that inject into rx, like virtio-net.
> > Here, the flags indicate GRO, and CHECKSUM_UNNECESSARY or
> > CHECKSUM_NONE without VIRTIO_NET_HDR_F_NEEDS_CSUM is normal.
> > 
> > 2. TSO requires checksum offload, i.e., ip_summed == CHECKSUM_PARTIAL.
> > False, as tcp[46]_gso_segment will fix up csum_start and offset for
> > all other ip_summed by calling __tcp_v4_send_check.
> > 
> > Because of 2, we can limit the scope of the fix to virtio_net_hdr
> > that do try to set these fields, with a bogus value.
> >
> 
> I see it is already queued and extremely sorry for not testing and getting
> back earlier. Good news: it does fix the issue in my setup(same as reported
> at [1])
> 
> So, FWIW,
> 
> Tested-by: Sudeep Holla <sudeep.holla@....com>

That is great to hear. Thanks for reporting your results, Sudeep.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ