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: <CAM_iQpXfxdfxkpxveshLTLHDbVt2B9bZw2yLMQz477yzmbbzjg@mail.gmail.com>
Date:   Tue, 28 Nov 2017 10:19:37 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        oss-drivers@...ronome.com, Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH net] cls_bpf: don't decrement net's refcount when offload fails

On Mon, Nov 27, 2017 at 11:11 AM, Jakub Kicinski
<jakub.kicinski@...ronome.com> wrote:
> When cls_bpf offload was added it seemed like a good idea to
> call cls_bpf_delete_prog() instead of extending the error
> handling path, since the software state is fully initialized
> at that point.  This handling of errors without jumping to
> the end of the function is error prone, as proven by later
> commit missing that extra call to __cls_bpf_delete_prog().
>
> __cls_bpf_delete_prog() is now expected to be invoked with
> a reference on exts->net or the field zeroed out.  The call
> on the offload's error patch does not fullfil this requirement,
> leading to each error stealing a reference on net namespace.
>
> Create a function undoing what cls_bpf_set_parms() did and
> use it from __cls_bpf_delete_prog() and the error path.
>
> Fixes: aae2c35ec892 ("cls_bpf: use tcf_exts_get_net() before call_rcu()")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Reviewed-by: Simon Horman <simon.horman@...ronome.com>

Acked-by: Cong Wang <xiyou.wangcong@...il.com>


Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ