[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJA4nC_c7K0ivb=hENFZL5sEB54SQHvMSjEAJQG7pLEmA@mail.gmail.com>
Date: Mon, 22 Apr 2024 12:40:10 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Hyunwoo Kim <v4bel@...ori.io>
Cc: pshelar@....org, imv4bel@...il.com, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org, dev@...nvswitch.org
Subject: Re: [PATCH] net: openvswitch: Fix Use-After-Free in ovs_ct_exit
On Mon, Apr 22, 2024 at 11:37 AM Hyunwoo Kim <v4bel@...ori.io> wrote:
>
> Since kfree_rcu, which is called in the hlist_for_each_entry_rcu traversal
> of ovs_ct_limit_exit, is not part of the RCU read critical section, it
> is possible that the RCU grace period will pass during the traversal and
> the key will be free.
>
> To prevent this, it should be changed to hlist_for_each_entry_safe.
>
> Fixes: 11efd5cb04a1 ("openvswitch: Support conntrack zone limit")
> Signed-off-by: Hyunwoo Kim <v4bel@...ori.io>
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Thanks !
Powered by blists - more mailing lists