Thread (9 messages) 9 messages, 4 authors, 2014-07-29

Re: [PATCH] regulatory: add NULL to alpha2

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2014-07-21 10:02:21

On Mon, 2014-06-30 at 15:23 -0700, Luis R. Rodriguez wrote:
On Mon, Jun 23, 2014 at 11:43:06AM +0200, Johannes Berg wrote:
quoted
On Wed, 2014-06-11 at 10:23 +0300, Arik Nemtsov wrote:
quoted
From: Eliad Peller <redacted>

alpha2 is defined as 2-chars array, but is used in multiple
places as string (e.g. with nla_put_string calls), which
might leak kernel data.

Solve it by simply adding an extra char for the NULL
terminator, making such operations safe.
I'm beginning to think that it would make more sense to just not use
nla_put_string()?
If the reason for adding the check was because of a new use case
then yes, but other than that are there other reasons you were
considering?
This was never intended to be a string, only 2 characters ... so why use
it with string functions?

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help