[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2859e5ba-7d4f-a5eb-1360-979c09b7f71c@gmail.com>
Date: Mon, 9 Jul 2018 13:51:41 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
Vlad Buslov <vladbu@...lanox.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us
Subject: Re: [PATCH net-next] net: sched: fix unprotected access to rcu cookie
pointer
On 07/09/2018 01:34 PM, Marcelo Ricardo Leitner wrote:
> I am not sure if this is enough to fix the entire issue. Now it will
> fetch the length correctly but, what guarantees that when it tries to
> actually copy the key (tcf_action_dump_1), the same act_cookie pointer
> will be used? As in, can't the new re-fetch be different/smaller than
> the object used here?
>
Yes, this presumably should use rtnl_dereference()
RTNL should be held between tcf_action_shared_attrs_size() and tcf_action_dump_1()
Although it might not be the case anymore, we keep changing this RTNL requirement
in dump operations ;)
Powered by blists - more mailing lists