diff options
| author | Dave Airlie <airlied@redhat.com> | 2017-12-19 21:37:24 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2017-12-19 21:37:24 +1000 |
| commit | 6b7dcb536e3535444c39286333f10d06d2f44fb5 (patch) | |
| tree | 6a4c1e30e5900626e506d46b100d21a2fcd59003 /crypto/asymmetric_keys/x509_cert_parser.c | |
| parent | a942b3c2cddc4378482a427845d15c78eb50f4d4 (diff) | |
| parent | 1291a0d5049dbc06baaaf66a9ff3f53db493b19b (diff) | |
| download | talos-op-linux-6b7dcb536e3535444c39286333f10d06d2f44fb5.tar.gz talos-op-linux-6b7dcb536e3535444c39286333f10d06d2f44fb5.zip | |
BackMerge tag 'v4.15-rc4' into drm-next
Linux 4.15-rc4
Daniel requested it to fix some messy conflicts.
Diffstat (limited to 'crypto/asymmetric_keys/x509_cert_parser.c')
| -rw-r--r-- | crypto/asymmetric_keys/x509_cert_parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c index dd03fead1ca3..ce2df8c9c583 100644 --- a/crypto/asymmetric_keys/x509_cert_parser.c +++ b/crypto/asymmetric_keys/x509_cert_parser.c @@ -409,6 +409,8 @@ int x509_extract_key_data(void *context, size_t hdrlen, ctx->cert->pub->pkey_algo = "rsa"; /* Discard the BIT STRING metadata */ + if (vlen < 1 || *(const u8 *)value != 0) + return -EBADMSG; ctx->key = value + 1; ctx->key_size = vlen - 1; return 0; |

