ASN1SCC
ASN1SCC: Out-of-bounds write in BitStream_DecodeConstraintWholeNumber (uPER/ACN)
ASN1SCC is an open source ASN.1 compiler for embedded systems. Prior to 4.7.0.1, BitStream_DecodeConstraintWholeNumber in asn1crt/asn1crt_encoding.c reads enough bits for a constrained integer but does not reject values above the declared range when the encoded range is not a power of two. Generated uPER and ACN decoders for variable-size SEQUENCE OF, OCTET STRING, BIT STRING, and string values use the invalid result as a loop or copy length, so a crafted over-range size field can write beyond a destination buffer. Decoding untrusted affected data can corrupt heap or stack memory, cause a crash, or potentially permit code execution. This issue is fixed in version 4.7.0.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 4.7.0.1
Fixed in 4.7.0.1
Mitigation
Upgrade asn1scc to 4.7.0.1 or later.
References
- Vendor advisory github.com/esa/asn1scc/security/advisories/GHS…
- Patch github.com/esa/asn1scc/commit/fe6ab763bc60d8a2…
- Release notes github.com/esa/asn1scc/releases/tag/4.7.0.1
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.