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]
Message-ID: <CAKD1Yr3j0M=hCXmvjNf_EQhejMVinSeR4nj5p910iY8G4i1BfA@mail.gmail.com>
Date:   Tue, 21 Mar 2017 16:00:25 +0900
From:   Lorenzo Colitti <lorenzo@...gle.com>
To:     Chenbo Feng <chenbofeng.kernel@...il.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Willem de Bruijn <willemb@...gle.com>,
        Chenbo Feng <fengc@...gle.com>
Subject: Re: [PATCH net-next v6 2/3] Add a eBPF helper function to retrieve
 socket uid

On Tue, Mar 21, 2017 at 1:08 PM, Chenbo Feng
<chenbofeng.kernel@...il.com> wrote:
> +       if (!sk || !sk_fullsock(sk))
> +               return overflowuid;
> +       kuid = sock_net_uid(sock_net(sk), sk);
> +       return from_kuid_munged(current_user_ns(), kuid);

Is current_user_ns() correct in all the contexts you'll want to run
this code from? For packets sent by userspace applications it's likely
to be correct, but what about received packets, and packets processed
by the xt_ebpf module?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ