All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, David Howells <dhowells@redhat.com>,
	keyrings@vger.kernel.org, Wang Lei <wang840925@gmail.com>,
	Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH net] KEYS: DNS: fix parsing multiple options
Date: Mon, 25 Jun 2018 17:37:24 +0000	[thread overview]
Message-ID: <20180625173724.GB180889@gmail.com> (raw)
In-Reply-To: <8195.1528992870@warthog.procyon.org.uk>

On Thu, Jun 14, 2018 at 05:14:30PM +0100, David Howells wrote:
> The fix seems to work, but the use of kstrtoul():
> 
> 	ret = kstrtoul(eq, 10, &derrno);
> 
> is incorrect since the buffer can't been modified to block out the next
> argument if there is one, so the following fails:
> 
> 	perl -e 'print "#dnserror=1#", "\x00" x 1' |
> 	keyctl padd dns_resolver desc @s
> 
> (Note this is preexisting and nothing to do with your patch).
> 
> I'm not sure how best to handle this.
> 
> Anyway, Dave, can you take Eric's patch into the net tree with:
> 
> 	Acked-by: David Howells <dhowells@redhat.com>
> 
> David

It could be handled by copying the option value to a temporary buffer.
Anyway, that can be a separate fix...

David (Miller), are you planning to take this through -net?

Thanks!

- Eric

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers3@gmail.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, David Howells <dhowells@redhat.com>,
	keyrings@vger.kernel.org, Wang Lei <wang840925@gmail.com>,
	Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH net] KEYS: DNS: fix parsing multiple options
Date: Mon, 25 Jun 2018 10:37:24 -0700	[thread overview]
Message-ID: <20180625173724.GB180889@gmail.com> (raw)
In-Reply-To: <8195.1528992870@warthog.procyon.org.uk>

On Thu, Jun 14, 2018 at 05:14:30PM +0100, David Howells wrote:
> The fix seems to work, but the use of kstrtoul():
> 
> 	ret = kstrtoul(eq, 10, &derrno);
> 
> is incorrect since the buffer can't been modified to block out the next
> argument if there is one, so the following fails:
> 
> 	perl -e 'print "#dnserror=1#", "\x00" x 1' |
> 	keyctl padd dns_resolver desc @s
> 
> (Note this is preexisting and nothing to do with your patch).
> 
> I'm not sure how best to handle this.
> 
> Anyway, Dave, can you take Eric's patch into the net tree with:
> 
> 	Acked-by: David Howells <dhowells@redhat.com>
> 
> David

It could be handled by copying the option value to a temporary buffer.
Anyway, that can be a separate fix...

David (Miller), are you planning to take this through -net?

Thanks!

- Eric

  reply	other threads:[~2018-06-25 17:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 16:20 [PATCH net] KEYS: DNS: fix parsing multiple options Eric Biggers
2018-06-08 16:20 ` Eric Biggers
2018-06-11  9:40 ` Simon Horman
2018-06-11  9:40   ` Simon Horman
2018-06-11 17:57   ` Eric Biggers
2018-06-11 17:57     ` Eric Biggers
2018-06-11 18:08     ` Simon Horman
2018-06-11 18:08       ` Simon Horman
2018-06-14 16:18   ` David Howells
2018-06-14 16:18     ` David Howells
2018-06-14 16:14 ` David Howells
2018-06-14 16:14   ` David Howells
2018-06-25 17:37   ` Eric Biggers [this message]
2018-06-25 17:37     ` Eric Biggers
  -- strict thread matches above, loose matches on Subject: below --
2018-06-26 16:20 David Howells

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=20180625173724.GB180889@gmail.com \
    --to=ebiggers3@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@google.com \
    --cc=keyrings@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wang840925@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.