diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-23 14:29:43 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-23 14:29:43 +0200 |
commit | 7706abf5a0eb4c082897fd2a17a0ac0898e39666 (patch) | |
tree | 982d22365f1aeedc43a796ef816cf1b1fa8480a7 /lib/digsig.c | |
parent | ca3c5858834f75543a4e2e115b1578c01558b2ce (diff) | |
parent | bb176f67090ca54869fc1262c913aa69d2ede070 (diff) |
Merge 4.14-rc6 into staging-next
We want the IIO and staging driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/digsig.c')
-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; |