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]
Date:   Tue, 14 Jan 2020 17:04:33 +0100
From:   Jakub Sitnicki <jakub@...udflare.com>
To:     Martin Lau <kafai@...com>
Cc:     "bpf\@vger.kernel.org" <bpf@...r.kernel.org>,
        "netdev\@vger.kernel.org" <netdev@...r.kernel.org>,
        "kernel-team\@cloudflare.com" <kernel-team@...udflare.com>,
        Eric Dumazet <edumazet@...gle.com>,
        "John Fastabend" <john.fastabend@...il.com>,
        Lorenz Bauer <lmb@...udflare.com>
Subject: Re: [PATCH bpf-next v2 03/11] net, sk_msg: Clear sk_user_data pointer on clone if tagged

On Mon, Jan 13, 2020 at 09:15 PM CET, Martin Lau wrote:
> On Fri, Jan 10, 2020 at 11:50:19AM +0100, Jakub Sitnicki wrote:
>> sk_user_data can hold a pointer to an object that is not intended to be
>> shared between the parent socket and the child that gets a pointer copy on
>> clone. This is the case when sk_user_data points at reference-counted
>> object, like struct sk_psock.
>> 
>> One way to resolve it is to tag the pointer with a no-copy flag by
>> repurposing its lowest bit. Based on the bit-flag value we clear the child
>> sk_user_data pointer after cloning the parent socket.
> LGTM.  One nit, WARN_ON_ONCE should be enough for all the cases if they
> would ever happen.  Having continuous splat on the same thing is not
> necessary useful while it could be quite distributing for people
> capture/log them.

Will switch to WARN_ON_ONCE in v3. Thanks for the review!

>
> Acked-by: Martin KaFai Lau <kafai@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ