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: <CA+FuTSema7dvUzqh4rg2yX918svdQPEBY9mRMZKPK_Oi8E_Tmg@mail.gmail.com>
Date:   Thu, 12 Jan 2023 10:48:24 -0500
From:   Willem de Bruijn <willemb@...gle.com>
To:     Hervé Boisse <admin@...geek.ovh>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 1/2] net/af_packet: fix tx skb protocol on SOCK_PACKET sockets

On Tue, Jan 10, 2023 at 2:38 PM Hervé Boisse <admin@...geek.ovh> wrote:
>
> Commit 75c65772c3d1 ("net/packet: Ask driver for protocol if not provided
> by user") introduces packet_parse_headers() to extract protocol for
> SOCK_RAW sockets.
> But, SOCK_PACKET sockets which provide similar behaviour are not considered
> so far and packets sent by those sockets will have their protocol unset.
>
> Extract the skb protocol value from the packet for SOCK_PACKET sockets, as
> currently done for SOCK_RAW sockets.
>
> Fixes: 75c65772c3d1 ("net/packet: Ask driver for protocol if not provided by user")
> Signed-off-by: Hervé Boisse <admin@...geek.ovh>

Reviewed-by: Willem de Bruijn <willlemb@...gle.com>

packet_sendmsg_spkt (SOCK_PACKET) also prepares raw packets and
validates their link layer header length with dev_validate_header
before calling packet_parse_headers. It should be fine to call
dev_parse_protocol.

Technically this adds a feature to packets of type SOCK_PACKET.  I would
not qualify it as a bug fix. And not sure we care about adding new features to
SOCK_PACKET. New applications should use SOCK_RAW.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ