[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30124.1505837342@warthog.procyon.org.uk>
Date: Tue, 19 Sep 2017 17:09:02 +0100
From: David Howells <dhowells@...hat.com>
To: Eric Biggers <ebiggers3@...il.com>
Cc: dhowells@...hat.com, keyrings@...r.kernel.org,
Michael Halcrow <mhalcrow@...gle.com>,
linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, Eric Biggers <ebiggers@...gle.com>,
stable@...r.kernel.org
Subject: Re: [PATCH] KEYS: prevent KEYCTL_READ on negative key
Eric Biggers <ebiggers3@...il.com> wrote:
> + if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
> + ret = -ENOKEY;
> + goto error2;
> + }
It might be better to do this check in key_validate(). Also, it should
perhaps take the error from key->reject_error.
David
Powered by blists - more mailing lists