linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: Arik Nemtsov <arik@wizery.com>,
	linux-wireless@vger.kernel.org, Eliad Peller <eliad@wizery.com>
Subject: Re: [PATCH] regulatory: add NULL to alpha2
Date: Mon, 21 Jul 2014 12:02:13 +0200	[thread overview]
Message-ID: <1405936933.32255.8.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20140630222303.GO1390@garbanzo.do-not-panic.com> (sfid-20140701_002311_478050_7925FB16)

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:
> > On Wed, 2014-06-11 at 10:23 +0300, Arik Nemtsov wrote:
> > > From: Eliad Peller <eliad@wizery.com>
> > > 
> > > 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


  reply	other threads:[~2014-07-21 10:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11  7:23 [PATCH] regulatory: add NULL to alpha2 Arik Nemtsov
2014-06-11  8:30 ` Luis R. Rodriguez
2014-06-11  8:39   ` Eliad Peller
2014-06-23  9:43 ` Johannes Berg
2014-06-30 22:23   ` Luis R. Rodriguez
2014-07-21 10:02     ` Johannes Berg [this message]
2014-07-29  1:26       ` Luis R. Rodriguez
2014-07-29  6:34         ` Johannes Berg
2014-07-29 11:41 ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405936933.32255.8.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arik@wizery.com \
    --cc=eliad@wizery.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@do-not-panic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).