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: <3dd151ce-01cf-7267-af13-c509e617e022@iogearbox.net>
Date:   Fri, 3 Apr 2020 00:52:18 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Jakub Sitnicki <jakub@...udflare.com>, bpf@...r.kernel.org
Cc:     netdev@...r.kernel.org, kernel-team@...udflare.com,
        kbuild test robot <lkp@...el.com>
Subject: Re: [PATCH bpf] net, sk_msg: Don't use RCU_INIT_POINTER on
 sk_user_data

On 4/2/20 2:55 PM, Jakub Sitnicki wrote:
> sparse reports an error due to use of RCU_INIT_POINTER helper to assign to
> sk_user_data pointer, which is not tagged with __rcu:
> 
> net/core/sock.c:1875:25: error: incompatible types in comparison expression (different address spaces):
> net/core/sock.c:1875:25:    void [noderef] <asn:4> *
> net/core/sock.c:1875:25:    void *
> 
> ... and rightfully so. sk_user_data is not always treated as a pointer to
> an RCU-protected data. When it is used to point at an RCU-protected object,
> we access it with __sk_user_data to inform sparse about it.
> 
> In this case, when the child socket does not inherit sk_user_data from the
> parent, there is no reason to treat it as an RCU-protected pointer.
> 
> Use a regular assignment to clear the pointer value.
> 
> Fixes: f1ff5ce2cd5e ("net, sk_msg: Clear sk_user_data pointer on clone if tagged")
> Reported-by: kbuild test robot <lkp@...el.com>
> Signed-off-by: Jakub Sitnicki <jakub@...udflare.com>

LGTM, applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ