4 * Added support for basic Information Object Sets driven code generation.
6 * Added LTE RRC example (Bi-Ruei, Chiu).
7 * Added IEEE 1609.2 example.
8 * Added SAE J2735 example.
11 * Converter example (included by default):
12 * converter-sample.c renamed into converter-example.c
13 * make converter-example.mk file for building that converter
14 * asn1c -no-gen-example to stop generating converter-example.{c,mk}
15 * asn1c -no-gen-example option to disable converter-example generation.
16 * Added random value generation (-R option to converter-example).
17 * Added LibFuzzer-based randomized tests for supported transfer syntaxes
18 (DER, OER, UPER, XER) into tests/tests-randomized. See the following
19 article to get the latest LibFuzzer-enabled clang on macOS:
20 https://medium.com/@levwalkin/compile-llvm-clang-libfuzzer-b61e82718430
21 then ensure the new clang is in the way:
22 CC=clang CXX=clang++ ./configure --enable-Werror --enable-test-fuzzer
23 * OBJECT IDENTIFIER and RELATIVE-OID API simplified.
24 * uper_encode() API got new argument (breaks API compatibility).
25 * asn1c -gen-XXX flags are deprecated. Use -no-gen-XXX to disable codecs.
28 * CVE-2017-12966 verified not present.
29 * Fix incomplete (failed) CHOICE XER decoding memory leak.
30 (Severity: medium; Security impact: medium)
31 * Fix REAL type overwrite conversion memory leak.
32 (Severity: low; Security impact: medium)
33 * Fix UPER string decoding constrained only by lower bound > 0
34 (Severity: low; Security impact: none)
35 * Fix UPER decoding of large [bit-]strings of size a multiple of 16K
36 (Severity: low; Security impact: none)
37 * Fix XER decoder crash on maliciously constructed ENUMERATED input.
38 (Severity: medium; Security impact: medium)
41 * PER decoding: avoid memory leak on error. By github.com/simo5
42 * Constness patch #46 by Wim L <wiml@omnigroup.com> (41bbf1c..78d604f).
44 * Fixed generated file permissions introduced by earlier pull (issue/32).
45 * Win32/MinGW patch #31 by Frank Morgner (frankmorgner).
46 * Autoreconf fix patch by Dave Cridland (github.com/dwd)
47 * Fix autoreconf-2.69 failure by github.com/brchiu
48 * Fix C99 warnings. Fix by Adrien Destugues (github.com/pulkomandy).
49 * C89 compliance fix by Jaroslav Imrich (github.com/jariq).
50 * C standard compliance fixes by Markus Elfring (github.com/elfring).
53 * Build structure fixes for portability.
54 * Disable long debug of ASN.1 operations during `make check` stage.
55 * Introduce --enable-ASN_DEBUG configure flag to emit long debug output.
58 * Updated asn1c-usage.pdf.
59 * Made -fskeletons-copy a default option; removed cmdline option.
60 * Made -fnative-types a default option; removed cmdline option.
61 Added -fwide-types for backwards compatibility.
62 * Add -fline-refs to avoid being unfriendly to version control systems.
63 * Default constraint checking fix.
64 Thanks to Bartosz Marcinkiewicz <bma@megawatt.com.pl>
65 * Get rid of non-standard pointer arithmetics on void* pointer.
66 * PER-encoding of integers wider than 32 bits.
70 * GeneralizedTime fix for working with time offsets which are not
71 representable in whole hours. (Severity: low; Security impact: low)
72 Thanks to IP Fabrics, Inc.
73 * Added -fincludes-quoted to asn1c to generate #includes in "double"
74 instead of <angle> quotes.
75 * PER encoding correctness fix. (Severity: high; Security impact: low)
76 Reported by Grzegorz Aksamit.
77 * ENUMERATED extension values check relaxed. Reported by Gabriel Burca.
78 * Fixed decimal decoding of REAL values in -fnative-types mode
79 (Severity: medium; Security impact: medium)
80 * Removed webcgi subproject (introduced in 2004) as useless.
84 * Added -pdu=all and -pdu=<type> switches to asn1c.
85 * Added PER support for most known-multiplier string types:
86 IA5String, VisibleString, PrintableString, BMPString, UniversalString;
87 useful types: GeneralizedTime, UTCTime, ObjectDescriptor;
88 as well as REAL and OBJECT IDENTIFIER.
90 * Added PER support for extensions in SEQUENCE.
91 * Multiple enhancements by Daniele Varrazzo <daniele.varrazzo@gmail.com>
92 * Fixed explicit tagging of an in-lined constructed type.
93 (Severity: low; Security impact: none).
94 * Memory leak fixed in SET OF / SEQUENCE OF when wrong encoding
95 is encountered. (Severity: medium; Security impact: low)
96 * Fixed extensibility handling of second SEQUENCE production.
97 (Severity: low; Security impact: none)
98 * Added DEFAULT handling for known multiplier string.
99 * Added a sample OMA ULP decoder (./examples/sample.source.ULP).
100 * Added full-width 32-bit integer encoding support in PER.
101 * Fixed 1-byte OOB write issue with non-standard and Windows
102 memory allocators (Severity: low; Security impact: medium).
103 Reported by Sheng Yu.
107 * skeletons/standard-modules directory is now used for standard types.
108 * Fixed class field access problem (Test case 98)
109 (Severity: medium; Security impact: none)
110 * Refactored Information Object Classes parsing.
111 * Refactored Parameterization support.
112 * [typedef enum foo {}] foo_e; is now e_foo, see #1287989
113 * Refactored ValueSetTypeAssignment parsing.
114 * asn-decoder-template.c renamed into converter-sample.c
115 * MEGACO (Media Gateway Control Protocol) decoder sample added.
116 * First release of PER encoder (does not encode SETs yet).
117 * Added a sample LDAP decoder (./examples/sample.source.LDAP3).
118 * Added a sample 3GPP RRC decoder (./examples/sample.source.RRC).
119 * Added a sample MEGACO (H.248.1) decoder (sample.source.MEGACO).
123 * SET OF CHOICE, SEQUENCE OF CHOICE and a certain named S/O types
124 are represented differently in XER. THIS IS AN INCOMPATIBLE CHANGE.
125 (Test case 70) (Severity: low; Security impact: low)
126 * asn1c: Removed -ftypes88 command line option.
127 * Started PER implementation. Somewhat experimental!
131 * A proper solution to circular references. No kludge flags
132 should be necessary anymore to produce reference-free code:
133 recursive dependencies are resolved automatically.
134 * Test cases 73 & 92 keep track of various circular references.
135 * Introduced compiler directives to allow finer control over the
136 generated code ("--<ASN1C...>--" in comments), (Test case 93).
137 * New feature for unber(1): -s <skip> bytes.
138 * Mandatory elements map for SET was not getting generated properly.
139 (Test case 94) (Severity: high; Security impact: low)
140 * asn1c: new command line option: -fskeletons-copy.
144 * The obsolete X.208 syntax is handled gracefully now (compound types'
145 member names are invented on the fly). (Test case 87).
146 * Generating enumeration tables for INTEGER types (Test case 88).
147 * Generating enumeration tables for BIT STRING types (Test case 89).
148 * Conditional INTEGER/ENUMERATED representation: long vs. INTEGER_t
149 type is chosen based on PER visible constraints (Test cases 90, 91).
150 * Union structures for CHOICE type are not anonymous anymore.
151 * Made unber(1) program more verbose: effective structure length is
152 now displayed as L="<n>" at the closing tag. (Test check-xxber.sh).
153 * Fixed unber(1)'s -1 switch for indefinite encoding length.
154 * New command line option for unber(1): -m to enable minimalistic mode.
158 * Tagging mode is implicitly IMPLICIT if AUTOMATIC TAGS is used, #30.6.
160 * Started to use extern "C" {} in skeleton headers.
161 * Introduced -finline-choice command line option to fix
162 yet another class of circular references.
166 * GeneralizedTime API now supports fractions of seconds.
167 Thanks to Bent Nicolaisen <BN@JAI.com> for support.
168 * ASN.1 parser has been tweaked to allow parsing something like
169 "SEQUENCE----comment----", which is ambiguous for many reasons.
170 * XER decoder better handles not-yet-defined future extensions.
174 * Compiler now checks 64-bit overflows in constraints range handling
175 code. No effect on the code produced by the compiler.
176 * Compiler support for tagged and marked parametrized members.
177 * Empty tags to element map avoided.
178 * Compiled code GCC 4.x compatibility.
182 * Fixed check-70.-fnative-integers.c test (it was failing
183 when no test directory was found).
187 * Added extra const qualifiers into the support code.
188 * More RFC variations supported in crfc2asn1.pl.
189 * Refined string values compatibility. (Test cases 77, 78).
190 * Support for ContainedSubtype constraints. (Test case 16).
191 * Parsing support for CONSTRAINED BY. (Test case 79).
192 * Support for CharsDefn (Quadruple and Tuple, most used in
193 ASN1-CHARACTER-MODULE) (Test case 80).
194 * Pretty-printing support for WITH COMPONENT[S]. (Test case 82).
195 * Streamed OCTET STRING decoding of large values: fixed allocation
196 problem introduced in 0.9.9. (Severity: high; Security impact: medium)
197 Reported by Yann Grossel <olrick@users.sourceforge.net>.
198 * Fixed BASIC-XER encoding of REAL numbers.
202 * Fixed a name clash in produced constraint checking code.
203 * #includes are now in single quotes (to solve a name
204 clash with system's <time.h> on a Win32 system).
205 * Small refinement of XML DTD generation (`asn1c -X`).
206 * Relaxed XER processing rules to skip extra whitespace
207 in some more places. It also skips XML comments (although
208 XML comments in XER are prohibited by X.693, #8.2.1).
209 (Test case 70) (Severity: medium; Security impact: none)
210 Reported by <Dominique.Nerriec@alcatel.fr>.
211 * Constraints on primitive types being defined are now supported.
212 (Test case 74) (Severity: low; Security impact: none)
213 * XMLValueList generation fixed for CHOICE type.
214 (Severity: medium; Security impact: none)
215 * Added the GSM TAP3 decoder into ./examples/sample.source.TAP3
219 * Released -fcompound-names to fix the name clashes in the code
220 produced by the asn1c.
221 * Released -fno-include-deps to avoid #including non-critical
222 external dependencies.
223 * Compiler is taught to produce compilable code for yet another class
224 of circular ASN.1 type references.
225 * X.693:8.3.4 prohibits anything but SignedNumber; fixed XER codec.
226 * Fixed ENUMERATED identifier to value conversion in XER.
227 Reported by <jacque.celaire@caramail.com>.
228 * If the compiled file contents are the same as in already existing
229 file (left from previous compilation), the old file is retained.
230 This prevents thrashing `make` dependencies if amount of changes in
231 the original ASN.1 module(s) is small.
235 * Completed the XER XMLValueList encoding and decoding.
236 * Native integer type is now using "long".
237 * Fixed #1150856. Reported by <vvvy@users.sourceforge.net>.
238 * Some WIN32 portability fixes.
242 * First release of XER (XML) decoding implementation (somewhat
244 * ANY allocation routine fixed.
245 Reported by <mikko.ahonen@elma.net>.
246 * Fixed tag parsing (tags like "[ 0 ]" were not supported).
247 * Compiler now checks for duplicate ASN.1 types across modules.
251 * [NEW PLATFORM] Compiled and tested on Linux @ alpha64 (LP64).
252 Some code needed to be fixed regarding int-long conversions
253 (mostly inside the test suite), and floating point handling
254 code needed to be restructured to handle signalling NAN and
255 other floating point exceptions quietly. Smooth transition!
256 * [NEW PLATFORM] Compiled and tested on Sun Solaris 9 @ sparc.
257 Improved includes/defines of/for system headers.
258 * -X command line option added to asn1c to generate XML DTD.
259 * Empty SEQUENCE and SET clauses are now allowed.
260 * Removed confusion between &xNN; and &#xNN; in enber and unber.
261 * Removed order dependency in DEFAULT references to ENUMERATED
262 identifiers (./tests/68-*-OK.asn1).
263 * ber_dec_rval_t renamed into asn_dec_rval_t: more generality.
264 * Extensions in CHOICE types are properly marked as non-pointers
265 (Test case 59) (Severity: medium; Security impact: medium)
266 Reported by <roman.pfender@sdm.de>.
267 * Tagged CHOICE type is now supported again.
268 (Test case 59) (Severity: low; Security impact: low)
269 Reported by <orlinkata@dir.bg>.
270 * Implemented der_encode_to_buffer() procedure.
274 * Fixed automatic tagging for extensions of compound types.
275 * Fixed ParametrizedReference parsing: {} are now recognized.
279 * Finished CXER implementation by adding SET and SET OF canonical
281 * Fixed unber(1) limits controlling logic.
282 * Removed C99'izm from the x509dump, now understood by older compilers.
283 * Enhanced UTF8String constraint validation, now it checks
284 for the minimal encoding length; API of UTF8String_length() changed.
285 * Fixed SEQUENCE dealing with premature termination of the
286 optionals-laden indefinite length structure. The code was previously
287 refusing to parse such structures.
288 * Fixed explicitly tagged ANY type encoding and decoding
289 (Severity: medium; Security impact: low).
290 * Fixed CHOICE code spin when indefinite length structures appear
291 in the extensions (Severity: medium; Security impact: medium).
292 Reported by <siden@ul-gsm.ru>.
293 * BIT STRING now stores the number of unused octets in a separate field.
297 * Added several security firewalls: decoder's stack usage control
298 and the stricter checking of the TLV length.
299 * Implemented BASIC-XER encoding support (X.693).
300 * Implemented unber(1) and enber(1) for BER<->XML translation.
301 * Implemented CGI for online ASN.1 compilation (asn1c/webcgi).
302 * Implemented the sample X.509 decoder (./examples/sample.source.PKIX1).
303 * NamedType is now supported for SET OF/SEQUENCE OF type.
304 * Added -fno-constraints option to asn1c, which disabled generation of
305 ASN.1 subtype constraints checking code.
306 * Added ASN1C_ENVIRONMENT_VERSION and get_asn1c_environment_version().
307 * Fixed ANY type decoding (Severity: high; Security impact: low).
308 * Fixed BER decoder restartability problem with certain primitive
309 types (BOOLEAN, INTEGER, and REAL). The problem occured when the
310 encoding of such type is split between several bytes.
311 (Severity: high; Security impact: low)
312 * Support for cross-referencing type definitions (updated ./tests/43-*).
313 * Fixed pretty-printing of the REAL type. Added lots of test cases.
314 * Renamed asn1_* into asn_* in function and type names.
315 * Updated documentation.
319 * Fixed CER (common BER) decoder code. See check-25.c/VisibleString
320 case for details. X.690 specifies that inner structures in BER
321 encoding must be tagged by stripping off the outer tag for each
322 subsequent containment level. See also X.690: 8.21.5.4 and
323 the "Spouse" case in A.3.
324 (Severity: medium; Security impact: low)
325 * Added converters between any generic type and the ANY type.
326 * Parser fixed: Information Object Class fields may be taged.
327 * Parser fixed: tagged types inside SEQUENCE OF/SET OF support.
328 * Improved DEFAULT Value parsing and pretty-printing.
329 * Condition on distinct tags checker was incorrectly dealing with
330 tagged CHOICE types. Fixed. Modified tests/37-indirect-choice-OK.asn1
331 * Improved type name generation code ("struct foo" vs "foo_t").
332 * Fixed constraint checking code incorrectly dealing with imported
333 types with constraint values defined in other modules.
334 * Real REAL support! (Haven't tested denormals support yet!)
335 See skeletons/tests/check-REAL.c
339 * More support for recursive type definitions.
340 * Explicit support for ANY type decoding.
341 * Refactored tags processing code.
342 * Fixed constraints checking code: non-exploitable buffer overflow.
343 (Severity: medium; Security impact: low)
347 * Extended constraints support in parametrized types.
348 * Better support for parametrization and constraints handling.
349 * Better handling of recursive type definitions.
350 * Added support for ANY type.
354 * More flexible subtype constraints handling, with relaxed
355 PER visibility rules for actual constraints checking code generator.
356 * Indirect references in constraints resolver code fixed.
357 * Avoided compilation warning on gcc 3.3.3 systems.
358 * Better ValueSet printing.
362 * Documentation updated: doc/asn1c-usage.pdf
363 * Fixed OBJECT IDENTIFIER human-readable printing.
364 Reported by <siden@ul-gsm.ru>.
368 * Reworked subtype constraints handling, aiming at PER-applicability.
369 * BOOLEAN and NULL are now implemented in terms of native int type.
370 * Compiler now links in only necessary skeleton files.
371 * -t option added to asn1c to ease manual BER/CER/DER decoding.
372 * Added support COMPONENTS OF construct.
373 * Numerous parser fixes and enhancements.
374 * Better constraint failure reporting.
378 * Fixed BER encoder (problem encoding large tag values)
379 (Severity: medium; Security impact: low)
383 * Parser: fixed multiple IMPORTS problem (incorrect assertion).
384 * Parser: constraints extensibility parsing fix.
388 * Improved compiler output: duplicate #includes eliminated.
389 * Win32 portability fixes.
390 * More compatibility with C++ or non-GCC compilers.
394 * Fixed application-level problem in SET OF/SEQUENCE OF array cleanup.
395 (Severity: medium; Security impact: low)
396 * Improved asn_GT2time() and added asn_time2{GT,UT}() functions.
397 * BIT STRING pretty-printing.
401 * Fixed parser: memory leak in free_struct code for SET OF/SEQUENCE OF.
402 (Severity: high; Security impact: medium)
403 * Fixed parser: invalid memory reference in code constructing tags.
404 (Test case 48) (Severity: high; Security impact: medium)
405 When encoding data for certain ASN.1 specifications containing
406 explicit tags, the tag is always written incorrectly due to
407 incorrect memory reference. The encoding will almost always produce
408 unparseable data and might well reference unmapped region so program
409 would produce segmentation violation. Fortunately, memory is
410 read, not written, so remote exploits cannot execute arbitrary
411 code and triggering unmapped memory reference is highly unlikely
412 even it attacker knows the code (basically, the compiler should place
413 asn1_DEF_... right before the end of the mapped memory region, which
415 * Improved INTEGER type printing.
419 * Fixed compiler: extensibility of CHOICE and SET type has not been
420 taken into account during table construction.
421 (Test case 47) (Severity: high; Security impact: low)
425 * Fixed compiler: the skip values for IMPLICIT tagging were broken
426 in some complex cases where one type is defined using another.
427 (Test case 46) (Severity: medium; Security impact: low).
428 * Added -fknown-extern-type command line parameter to asn1c.
429 * Removed -N command line flag and underlying functionality
430 to honor KISS principle.
434 * RELATIVE-OID and OBJECT IDENTIFIER encoders/decoders are not bound
435 anymore to an integer type of specific size (unsigned long). The
436 size of an integer must be provided explicitly.
437 See {OBJECT_IDENTIFIER|RELATIVE_OID}_{get|set}_arcs().
438 * SEQUENCE BER decoder fixed again for complex CHOICE case
439 (Test case 44) (Severity: medium; Security impact: low).
443 * Enforced stricter conformance with C standards.
444 * SEQUENCE BER decoder is now equipped with the sorted map
445 in case of complex CHOICE descendants. Test case 44 created.
449 * Added const qualifier where necessary.
450 * Changed position of outmost_tag fetcher within asn1_TYPE_descriptor_t
455 * Added *_{get|set}_arcs_*() functions for OBJECT IDENTIFIER
456 and RELATIVE-OID, together with test cases.
460 * Introduced subtype constraints support (incomplete!).
461 * Fixed compiler. If the last member of the SEQUENCE is OPTIONAL
462 and absent in the encoding, and the type is extensible (...) or
463 EXTENSIBILITY IMPLIED flag is set, then the structure could not
464 be correctly decoded. (Severity: high; Security impact: low).
465 * Compiler: fixed recursive ASN.1 types inclusion (Severity: low,
466 Security impact: none).
467 * Parser: IMPORTS/FROM fixes, now allowing multiple sections.
468 * NEW PLATFORM: Compiled and tested on MacOS X (@ PowerPC).
469 No major portability issues experienced.
471 0.8.7: 2004-Apr-11 T-version-0-8-7
473 * Fixed SEQUENCE BER decoder: if the last member of the SEQUENCE is
474 OPTIONAL and absent in the encoding, RC_FAIL was returned instead
475 of RC_OK (Severity: high; Security impact: low).
476 * Added test case to check the above problem.
477 * Added test case to check -fnative-integers mode.
479 0.8.6: 2004-Apr-03 T-version-0-8-6
481 * Fixed compiler output for embedded ASN.1 structures.
483 0.8.5: 2004-Mar-28 T-version-0-8-5
485 * Fixed ber_tlv_length() computation problem (Severity: high,
486 Security impact: none).
487 Reported by <vss@high.net.ru>
491 * Removed RC_ITAG enumeration element from BER decoder.
492 This return code did not have much practical value.
494 0.8.3: 2004-Mar-14 T-version-0-8-3
496 * Fixed SET::BER decoder: restart after reaching a buffer boundary
497 weas broken (Severity: high; Security impact: low).
498 * Fixed OCTET STRING::BER decoder: restart after reaching a buffer
499 boundary was broken (Severity: high; Security impact: low).
500 Reported by <vss@high.net.ru>
501 * Added test cases to check decoders restartability.
502 * Slightly more general INTEGER2long decoder.
503 * Allowed nested /* C-type */ comments, as per X.680:2002.
505 0.8.2: 2004-Mar-01 T-version-0-8-2
507 * Fixed SEQUENCE BER decoder: an OPTIONAL element was required, where
508 should not have been (Severity: major; Security impact: low).
509 * Fixed print_struct pointer inheritance.
510 * Added -fno-c99 and -funnamed-unions
514 * -R switch to asn1c: Omit support code, compile only the tables.
515 * Introduced NativeInteger pseudotype.
516 * Corrected the informal print_struct()'s output format.
518 0.8.0: 2004-Feb-03 T-version-0-8-0
520 * Some documentation is created (a .pdf and a short manual page).
521 * Last touches to the code.
523 0.7.9: 2004-Feb-01 T-version-0-7-9
525 * Human readable printing support.
526 * Support for implicit (standard) constraints.
530 * SET now rejects duplicate fields in the data stream.
534 * Added types: GeneralizedTime and UTCTime.
536 0.7.6: 2004-Jan-24 T-version-0-7-6
538 * DER encoding of a SET OF now involves dynamic sorting.
540 0.7.5: 2004-Jan-24 T-version-0-7-5
542 * DER encoding of a SET with untagged CHOICE
543 now involves dynamic sorting.
545 0.7.0: 2004-Jan-19 T-version-0-7-0
547 * A bunch of DER encoders is implemented.
551 * Implemented CHOICE decoder.
552 * Implemented destructors support.
556 * Implemented SET decoder.
557 * Implemented SET OF and SEQUENCE OF decoders.
561 * Implemented BOOLEAN, NULL, ENUMERATED decoders.
562 * Implemented OCTET STRING decoder.
563 * Implemented BIT STRING decoder.
567 * First decoding of a BER-encoded structure!
571 * Framework and most of the compiler backbone coding done.
575 * Programming started.
577 === Bug importance disclosure terms ===
580 This term applies to the frequence the particular construct is used
581 in the real world. The higher the frequency, the more chances of triggering
583 low: The ASN.1 specifications which could trigger
584 this kind of bug are not widespread.
585 medium: The particular ASN.1 construct is used quite often,
586 so the chance of triggering an error is considerable.
587 high: This fix is considered urgent, or the particular ASN.1
588 construct triggering this bug is in wide use.
591 This term applies to the amount of potential damage a bug exploitation
593 none: No malicious exploitation is possible.
594 low: The local exploitation is unlikely; the remote exploitation
596 medium: The remote exploitation is possible when a particular ASN.1
597 construct is being used. If possible, only hard failure, spin
598 or memory leak are the possible outcome: no shellcode
599 injection could possibly be carried by the attack.
600 high: The remote shellcode injection is possible, or the bug is
601 otherwise remotely exploitable for most specifications.