mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
bsnmp: add asn1 message length validation
admbugs: 780 Submitted by: Guido Vranken, bz Reported by: Guido Vranken Security: CVE-2019-5610
This commit is contained in:
parent
ab7de25c25
commit
54e9e4e72d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350635
|
@ -100,6 +100,11 @@ asn_get_header(struct asn_buf *b, u_char *type, asn_len_t *len)
|
|||
*len = *b->asn_cptr++;
|
||||
b->asn_len--;
|
||||
}
|
||||
if (*len > b->asn_len) {
|
||||
asn_error(b, "len %u exceeding asn_len %u", *len, b->asn_len);
|
||||
return (ASN_ERR_EOBUF);
|
||||
}
|
||||
|
||||
return (ASN_ERR_OK);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue