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: <CACKFLim6Y5HoUSab=J=ex8hmFbJApivWpXpQV8pnzJ4EBnCs9w@mail.gmail.com>
Date:   Thu, 27 Feb 2020 11:26:58 -0800
From:   Michael Chan <michael.chan@...adcom.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     "Michael S. Tsirkin" <mst@...hat.com>,
        David Ahern <dahern@...italocean.com>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Andy Gospodarek <andy@...yhouse.net>
Subject: Re: virtio_net: can change MTU after installing program

On Wed, Feb 26, 2020 at 5:37 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Wed, 26 Feb 2020 12:02:03 -0500 Michael S. Tsirkin wrote:
> > On Wed, Feb 26, 2020 at 09:58:00AM -0700, David Ahern wrote:
> > > On 2/26/20 9:55 AM, Michael S. Tsirkin wrote:
> > > > OK that seems to indicate an ndo callback as a reasonable way
> > > > to handle this. Right? The only problem is this might break
> > > > guests if they happen to reverse the order of
> > > > operations:
> > > >   1. set mtu
> > > >   2. detach xdp prog
> > > > would previously work fine, and would now give an error.
> > >
> > > That order should not work at all. You should not be allowed to change
> > > the MTU size that exceeds XDP limits while an XDP program is attached.
> >
> >
> > Right. But we didn't check it so blocking that now is a UAPI change.
> > Do we care?
>
> I'd vote that we don't care. We should care more about consistency
> across drivers than committing to buggy behavior.
>
> All drivers should have this check (intel, mlx, nfp definitely do),
> I had a look at Broadcom and it seems to be missing there as well :(
> Qlogic also. Ugh.

The Broadcom bnxt_en driver should not allow the MTU to be changed to
an invalid value after an XDP program is attached.  We set the
netdev->max_mtu to a smaller value and dev_validate_mtu() should
reject MTUs that are not supported in XDP mode.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ