diff options
-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 03d7c63..6ba6fcd 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; |