lkml.org 
[lkml]   [2019]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v5 19/22] ethtool: provide WoL information in GET_SETTINGS request
On Wed, Mar 27, 2019 at 08:42:26PM -0700, Florian Fainelli wrote:
> On 3/25/2019 10:08 AM, Michal Kubecek wrote:
> >
> > + data->privileged = ethnl_is_privileged(skb);
>
> Is not this potentially creating a time of check/time of use issue? Can
> you check for ethnl_is_privileged() at the time where you fill in the
> reply skb?

I'm not sure what kind of race you have in mind but if this is a
problem, we might have even bigger one for any "SET" request where the
privilege check is performed even earlier by the genetlink dispatcher
(by setting GENL_UNS_ADMIN_PERM or GENL_ADMIN_PERM flag in genl_ops).

Michal

\
 
 \ /
  Last update: 2019-03-28 11:13    [W:0.097 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site