blob_parse expects blobs from trusted inputs, but in this case it can be
supplied with possibly malicious certificates from untrusted inputs as
well, so in order to prevent such conditions, switch to
blob_parse_untrusted which should hopefully handle such inputs
appropriately.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
bufpt = (struct blob_attr *)filebuf;
do {
- pret = blob_parse(bufpt, certtb, cert_policy, CERT_ATTR_MAX);
+ pret = blob_parse_untrusted(bufpt, len, certtb, cert_policy, CERT_ATTR_MAX);
if (pret <= 0)
/* no attributes found */
break;