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: <f2e6498d310454e9c884f3f8470477e0cc527b58.camel@infradead.org>
Date:   Wed, 23 Jun 2021 18:31:02 +0100
From:   David Woodhouse <dwmw2@...radead.org>
To:     Jason Wang <jasowang@...hat.com>, netdev@...r.kernel.org
Cc:     Eugenio PĂ©rez <eperezma@...hat.com>
Subject: Re: [PATCH v2 1/4] net: tun: fix tun_xdp_one() for IFF_TUN mode

On Wed, 2021-06-23 at 14:52 +0100, David Woodhouse wrote:
> @@ -2343,6 +2351,17 @@ static int tun_xdp_one(struct tun_struct *tun,
>         if (tun->flags & IFF_VNET_HDR)
>                 gso = &hdr->gso;
>  
> +       if (!(tun->flags & IFF_NO_PI)) {
> +               struct tun_pi *pi = xdp->data;
> +               if (datasize < sizeof(*pi)) {
> +                       atomic_long_inc(&tun->rx_frame_errors);
> +                       return  -EINVAL;
> +               }
> +               proto = pi->proto;
> +               reservelen += sizeof(*pi);
> +               datasize -= sizeof(*pi);
> +       }
> +
>         xdp_prog = rcu_dereference(tun->xdp_prog);
>         if (xdp_prog) {
>                 if (gso && gso->gso_type) {

Joy... that's wrong because when tun does both the PI and the vnet
headers, the PI header comes *first*. When tun does only PI and vhost
does the vnet headers, they come in the other order.

Will fix (and adjust the test cases to cope).


Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5174 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ