Re: [PATCH] KEYS: Skip key state checks when checking for possession

From: Greg KH
Date: Tue Jun 18 2013 - 12:55:54 EST


On Tue, Jun 18, 2013 at 05:47:22PM +0100, David Howells wrote:
> Skip key state checks (invalidation, revocation and expiration) when checking
> for possession. Without this, keys that have been marked invalid, revoked
> keys and expired keys are not given a possession attribute - which means the
> possessor is not granted any possession permits and cannot do anything with
> them unless they also have one a user, group or other permit.
>
> This causes failures in the keyutils test suite's revocation and expiration
> tests now that commit 96b5c8fea6c0861621051290d705ec2e971963f1 reduced the
> initial permissions granted to a key.
>
> The failures are due to accesses to revoked and expired keys being given
> EACCES instead of EKEYREVOKED or EKEYEXPIRED.
>
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> ---
>
> security/keys/internal.h | 1 +
> security/keys/process_keys.c | 8 +++++---
> security/keys/request_key.c | 6 ++++--
> security/keys/request_key_auth.c | 2 +-
> 4 files changed, 11 insertions(+), 6 deletions(-)
>

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.

</formletter>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/