[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180222.140704.166412303524863230.davem@davemloft.net>
Date: Thu, 22 Feb 2018 14:07:04 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: keescook@...gle.com
Cc: tgraf@...g.ch, johannes@...solutions.net, daniel@...earbox.net,
ast@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, danielmicay@...il.com
Subject: Re: nla_put_string() vs NLA_STRING
From: Kees Cook <keescook@...gle.com>
Date: Tue, 20 Feb 2018 22:00:26 -0800
> So, this specific problem needs fixing (in at least two places calling
> nla_put_string(msg, NL80211_ATTR_REG_ALPHA2, ...)). While I suspect
> it's only ever written an extra byte from the following variable in
> the structure which is an enum nl80211_dfs_regions, I worry there
> might be a lot more of these (though I'd hope unterminated strings are
> uncommon for internal representation). And more generally, it seems
> like only the NLA _input_ functions actually check nla_policy details.
> It seems that the output functions should do the same too, yes?
Generally speaking, the policy is for making sure the user doesn't
give us garbage.
When building netlink attributes itself, the kernel is supposed to
know what it is doing.
Powered by blists - more mailing lists