Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-09-06 11:38:08 +0200
committerTakashi Iwai <tiwai@suse.de>2019-09-06 11:38:08 +0200
commitb0a5161c7c4f0e4ee3af8f003ba555bfe42e29cd (patch)
tree75658fb8a1063156f23be50d8f00e063d1a670f3
parent7b831d9adb720574521ce29fdd632517310b64fe (diff)
keys: Fix missing null pointer check in
request_key_auth_describe() (bsc#1051510). suse-commit: 8fb27bb63ed890147a3592429f602e804554c1dd
-rw-r--r--security/keys/request_key_auth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/security/keys/request_key_auth.c b/security/keys/request_key_auth.c
index efe03f30ca43..57f41afdea17 100644
--- a/security/keys/request_key_auth.c
+++ b/security/keys/request_key_auth.c
@@ -71,6 +71,9 @@ static void request_key_auth_describe(const struct key *key,
{
struct request_key_auth *rka = key->payload.data[0];
+ if (!rka)
+ return;
+
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_positive(key))
@@ -88,6 +91,9 @@ static long request_key_auth_read(const struct key *key,
size_t datalen;
long ret;
+ if (!rka)
+ return -EKEYREVOKED;
+
datalen = rka->callout_len;
ret = datalen;