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_iQpWAn+-NKapaBfCHs9MfatzSLsAWv9RvjiCvn85fbxeezw@mail.gmail.com>
Date:   Wed, 29 Sep 2021 22:12:46 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Vlad Buslov <vladbu@...dia.com>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH net] net: sched: flower: protect fl_walk() with rcu

On Wed, Sep 29, 2021 at 8:09 AM Vlad Buslov <vladbu@...dia.com> wrote:
>
> Patch that refactored fl_walk() to use idr_for_each_entry_continue_ul()
> also removed rcu protection of individual filters which causes following
> use-after-free when filter is deleted concurrently. Fix fl_walk() to obtain
> rcu read lock while iterating and taking the filter reference and temporary
> release the lock while calling arg->fn() callback that can sleep.
>
...
> Fixes: d39d714969cd ("idr: introduce idr_for_each_entry_continue_ul()")

I don't dig the history, but I think this bug is introduced by your commit
which makes cls_flower lockless. If we still had RTNL lock here, we
would not have this bug, right?

> Signed-off-by: Vlad Buslov <vladbu@...dia.com>

Other than the Fixes tag,

Acked-by: Cong Wang <cong.wang@...edance.com>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ