mouse07410/asn1c: 1-byte Heap Out-of-Bounds Read in `INTEGER_decode_oer` via Malformed OER Payload
mouse07410/asn1c is an ASN.1 compiler. In 1.4 and earlier, a memory safety vulnerability was identified in the OER decoding skeleton files generated by asn1c (specifically INTEGER_oer.c). When parsing a maliciously crafted, zero-length OER payload for a variable-length, non-negative INTEGER type, the decoder fails to validate the required bytes before extracting the Most Significant Bit (MSB). This forces a precise 1-byte Heap Out-of-Bounds (OOB) Read. Because asn1c generated code is primarily deployed to parse untrusted network inputs (such as V2X network protocols, 5G telecom headers, or X.509 certificates), when the decoder processes untrusted network-originated input, a remote attacker can exploit this to cause a Denial of Service (DoS) or trigger incorrect integer interpretation in downstream applications (e.g., protocol state poisoning or logic bypass).
Problem Types
| Type | CWE ID | Description |
|---|
| CWE | CWE-20 | CWE-20: Improper Input Validation |
| CWE | CWE-125 | CWE-125: Out-of-bounds Read |
| CWE | CWE-130 | CWE-130: Improper Handling of Length Parameter Inconsistency |
Type: CWE
Description: CWE-20: Improper Input Validation
Type: CWE
Description: CWE-125: Out-of-bounds Read
Type: CWE
Description: CWE-130: Improper Handling of Length Parameter Inconsistency
Metrics
| Version | Base score | Base severity | Vector |
|---|
| 3.1 | 8.2 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H |
Version: 3.1
Base score: 8.2
Base severity: HIGH
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H