diff options
author | James Morris <james.l.morris@oracle.com> | 2017-10-19 12:28:38 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-10-19 12:28:38 +1100 |
commit | 494b9ae7abb84e6d88d7587906aff29dd26cf9d0 (patch) | |
tree | aeb24854a715777aaa9d433d57f5e45d05017f73 /lib | |
parent | 73d3393ada4f70fa3df5639c8d438f2f034c0ecb (diff) | |
parent | 68a1fdbbf8bd3378325e45c19e167a165f9ffc3a (diff) |
Merge commit 'tags/keys-fixes-20171018' into fixes-v4.14-rc5
Diffstat (limited to 'lib')
-rw-r--r-- | lib/digsig.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/digsig.c b/lib/digsig.c index 03d7c63837ae..6ba6fcd92dd1 100644 --- a/lib/digsig.c +++ b/lib/digsig.c @@ -87,6 +87,12 @@ static int digsig_verify_rsa(struct key *key, down_read(&key->sem); ukp = user_key_payload_locked(key); + if (!ukp) { + /* key was revoked before we acquired its semaphore */ + err = -EKEYREVOKED; + goto err1; + } + if (ukp->datalen < sizeof(*pkh)) goto err1; |