mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-07 00:01:49 -04:00
Don't handle PKCS#7 containers with infinite length encodings in pkcs7 plugin
This commit is contained in:
parent
3c820cdc23
commit
71dd4e7895
@ -114,6 +114,12 @@ pkcs7_t *pkcs7_generic_load(container_type_t type, va_list args)
|
|||||||
}
|
}
|
||||||
if (blob.len)
|
if (blob.len)
|
||||||
{
|
{
|
||||||
|
if (blob.len >= 2 &&
|
||||||
|
blob.ptr[0] == ASN1_SEQUENCE && blob.ptr[1] == 0x80)
|
||||||
|
{ /* looks like infinite lenght BER encoding, but we can't handle it.
|
||||||
|
* ignore silently, our openssl backend can handle it */
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
return parse_contentInfo(blob);
|
return parse_contentInfo(blob);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user