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]
Date:   Wed, 16 Oct 2019 20:02:40 -0700
From:   Maciej Żenczykowski <zenczykowski@...il.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     Yoshiki Komachi <komachi.yoshiki@....ntt.co.jp>,
        "David S. Miller" <davem@...emloft.net>,
        Network Development <netdev@...r.kernel.org>,
        Yoshiki Komachi <ysk@...sfc.keio.ac.jp>,
        Maxim Mikityanskiy <maximmi@...lanox.com>
Subject: Re: [PATCH net] af_packet: fix the tx skb protocol in raw sockets
 with ETH_P_ALL

> The Fixes tag is missing. Calling sendmsg on a packet socket bound to
> ETH_P_ALL goes back a long way. It is a user, not kernel, bug to do
> so.

I would argue it's not a bug at all - at least not the way you phrased it.

AFAIK it can/could be done correctly via specifying the protocol in
the sll_protocol field of the struct sockaddr_ll passed to sendmsg as
the target address.

Not specifying it would indeed be a bug (and a common one)
Hence I do agree it's better to automate this.

> But no more than sending on a socket bound to ETH_P_NONE (0), which
> was addressed in commit c72219b75fde ("packet: infer protocol from
> ethernet header if unset").

This is also not a bug.  That's simply how you send when you don't
want to receive.

Other approaches add your socket to the receive hooks and slow the system
down (even if you add a bpf filter to unconditionally drop stuff).

ie. this is the *optimal* way to send frames.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ