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: <5893CEAF.2090707@iogearbox.net>
Date:   Fri, 03 Feb 2017 01:28:31 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Lorenzo Colitti <lorenzo@...gle.com>
CC:     Chenbo Feng <chenbofeng.kernel@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Alexei Starovoitov <ast@...com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Willem de Bruijn <willemb@...gle.com>,
        Chenbo Feng <fengc@...gle.com>
Subject: Re: [PATCH net-next 2/2] Add a eBPF helper function to retrieve socket
 uid

On 02/03/2017 01:00 AM, Lorenzo Colitti wrote:
> On Fri, Feb 3, 2017 at 6:32 AM, Daniel Borkmann <daniel@...earbox.net> wrote:
>>> +       sk = skb->sk;
>>> +       kuid = sock_net_uid(dev_net(skb->dev), sk);
>>
>> Don't you need to test for fullsock? Do you mean something like below?
>
> It should be safe to call sock_net_uid on any type of socket
> (including NULL). sk_uid was added to struct sock in 86741ec25462
> ("net: core: Add a UID field to struct sock.")

Hmm, maybe I'm missing something, but then shouldn't this sit in
struct sock_common for being 'safe'? F.e. struct inet_timewait_sock
wouldn't have it ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ