From: ebiggers3@gmail.com (Eric Biggers)
To: linux-security-module@vger.kernel.org
Subject: [PATCH] KEYS: add missing permission check for request_key() destination
Date: Tue, 28 Nov 2017 11:06:52 -0800 [thread overview]
Message-ID: <20171128190652.GC45321@gmail.com> (raw)
In-Reply-To: <7849.1511863981@warthog.procyon.org.uk>
On Tue, Nov 28, 2017 at 10:13:01AM +0000, David Howells wrote:
> Eric Biggers <ebiggers3@gmail.com> wrote:
>
> > + if (do_perm_check) {
> > + ret = key_permission(make_key_ref(dest_keyring, 1),
> > + KEY_NEED_WRITE);
>
> dest_keyring may be NULL at this point as alloc_uid() doesn't automatically
> create keyrings.
>
> David
Argh, you're right. I must have been confused by the calls to key_serial(),
key_put(), etc., but those all check for NULL. I'll send a revised patch.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-11-28 19:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 22:58 [PATCH] KEYS: add missing permission check for request_key() destination Eric Biggers
2017-11-28 10:13 ` David Howells
2017-11-28 19:06 ` Eric Biggers [this message]
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=20171128190652.GC45321@gmail.com \
--to=ebiggers3@gmail.com \
--cc=linux-security-module@vger.kernel.org \
/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).