diff options
author | James Morris <james.l.morris@oracle.com> | 2017-10-19 03:28:38 +0200 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-10-19 03:28:38 +0200 |
commit | 494b9ae7abb84e6d88d7587906aff29dd26cf9d0 (patch) | |
tree | aeb24854a715777aaa9d433d57f5e45d05017f73 /lib | |
parent | Merge tag 'xfs-4.14-fixes-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux (diff) | |
parent | pkcs7: Prevent NULL pointer dereference, since sinfo is not always set. (diff) | |
download | linux-494b9ae7abb84e6d88d7587906aff29dd26cf9d0.tar.xz linux-494b9ae7abb84e6d88d7587906aff29dd26cf9d0.zip |
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; |