[PATCH] KEYS: prevent KEYCTL_READ on negative key
David Howells
dhowells at redhat.com
Tue Sep 19 16:09:02 UTC 2017
Eric Biggers <ebiggers3 at gmail.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
--
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
More information about the Linux-security-module-archive
mailing list