Commit Graph

18286 Commits

Author SHA1 Message Date
Nicolas Williams 05a952dbb9 asn1: Fix IMPLICIT tagging (codegen) 2021-03-10 19:15:17 -06:00
Nicolas Williams 7f4e9db9f9 asn1: Make int sizing consistent and better 2021-03-10 19:15:17 -06:00
Nicolas Williams 440bfeda58 asn1: Allow asn1_print to build w/o templating 2021-03-10 16:00:04 -06:00
Nicolas Williams c69a9764bc asn1: Update README.md 2021-03-10 12:24:01 -06:00
Nicolas Williams 659e444e3d asn1: Fix crash found by AFL 2021-03-10 12:23:51 -06:00
Nicolas Williams a51eaab7b9 asn1: Update README.md 2021-03-09 14:51:19 -06:00
Nicolas Williams cba34400fe asn1: Fix printing of open type choice names 2021-03-09 12:22:43 -06:00
Nicolas Williams 6b5feba91d asn1: Fix printing of bit string named members
Properly print commas between members.
2021-03-09 12:20:23 -06:00
Nicolas Williams 8bc4bae52d asn1: Free template memory leak
New AFL session in progress.
2021-03-09 11:21:54 -06:00
Nicolas Williams 2a826fb331 asn1: Results from latest AFL session 2021-03-09 11:21:47 -06:00
Nicolas Williams a62dd9887f hx509: Fix bug found by clang (wrong enum)
We need to revisit a lot of code in lib/hx509/, lib/krb5/, and kdc/ now
that the ASN.1 compiler properly handles IMPLICIT tagging.  And we
should take advantage of automatic open type handling.
2021-03-08 17:53:50 -06:00
Nicolas Williams 77126b4058 asn1: Update README-X681.md 2021-03-08 16:16:00 -06:00
Nicolas Williams fbb1a4e3ec bx509d: Allow requesting longer cert lifetimes
Add a `lifetime=NUMunit` query parameter.

Also add a krb5.conf parameter to indicate whether this is allowed.
We already have a max lifetime configuration parameter.
2021-03-07 22:20:06 -06:00
Nicolas Williams 00e0475ce2 asn1: Use name not gen_name for JSON enum printing 2021-03-07 16:32:41 -06:00
Nicolas Williams 5d7d1897de asn1: Pretty-print enum values 2021-03-07 13:36:37 -06:00
Nicolas Williams be61d72be3 asn1: Some TPM fields have to be EXPLICIT
The TCG EK cert profile says that the context tags in the
TPMSecurityAssertions type are IMPLICIT.  The sample EK cert we have
has them as EXPLICIT.

What to do?
2021-03-07 00:31:47 -06:00
Nicolas Williams f7a018f002 asn1: Minor compiler performance improvment 2021-03-06 15:20:42 -06:00
Nicolas Williams 3f206d56fb asn1: Add missing cases for ENUMERATED 2021-03-06 15:13:53 -06:00
Nicolas Williams 4010ffa96e asn1: Fix Windows build harder 2021-03-06 14:57:00 -06:00
Nicolas Williams bc51427ec9 asn1: Update JSON in check-gen.c (fix test) 2021-03-06 14:47:49 -06:00
Nicolas Williams a450ef1884 asn1: Note lame JSON printing of ENUMERATEDs 2021-03-06 14:47:24 -06:00
Nicolas Williams 7559f36415 asn1: Add -q option to asn1_print 2021-03-06 14:46:52 -06:00
Nicolas Williams ff571d52a0 asn1: Fix JSON printing bug 2021-03-06 14:46:21 -06:00
Nicolas Williams d263299016 asn1: Fix OID symbolic resolution bug 2021-03-06 14:46:08 -06:00
Nicolas Williams 834b935cc3 asn1: Add miminized corpus for AFL 2021-03-06 12:47:25 -06:00
Nicolas Williams 979dd59ac9 asn1: Fix Windows build (missing symbols) 2021-03-06 01:02:13 -06:00
Nicolas Williams 94a7483243 asn1: Fix dumb bug in JSON printing 2021-03-06 01:01:51 -06:00
Nicolas Williams 88a4c6f444 asn1: Fix leak in asn1_print 2021-03-05 15:53:20 -06:00
Nicolas Williams 4c261911fa asn1: Fix alignment issue in templating open types
And a stray ^a increment of a 0 into a 1.

Found with AFL.
2021-03-05 15:52:30 -06:00
Nicolas Williams 2035efe765 asn1: Fix braino in asn1_print 2021-03-05 14:06:17 -06:00
Nicolas Williams 7bc02e5d5f asn1: Make note about fuzzing in README 2021-03-05 13:24:21 -06:00
Nicolas Williams 6ecab8ce51 asn1: Make asn1_print a fuzzing tool 2021-03-05 13:19:38 -06:00
Nicolas Williams 4502e989f2 asn1: Fix template decode bug found with AFL
The value we initialize a CHOICE's `element` enum field to, prior to
decoding the CHOICE value, needs be one that does not cause
`asn1_free()` to do anything since we've not done anything yet either.
2021-03-05 13:00:03 -06:00
Nicolas Williams f548e5d9c6 asn1: Complete c6fab6c87 (AFL) 2021-03-04 16:15:20 -06:00
Nicolas Williams 114cbc9723 asn1: Document fuzzing in README-template.md 2021-03-04 00:15:54 -06:00
Nicolas Williams c6fab6c871 asn1: Fix open decode bug found by AFL
Should always run AFL before pushing changes to the ASN.1 compiler or
template interpreter!

Still fuzzing.  There are crashers in the _asn1_print() path, though
right now they cannot affect anything else in Heimdal other than
asn1_print, since that's the only thing calling it yet.
2021-03-03 23:29:25 -06:00
Nicolas Williams 1d2bfd6179 asn1: Fix warnings in asn1_print 2021-03-03 23:28:49 -06:00
Nicolas Williams 4eff66a2cd asn1: Trade template crash for leak (AFL)
Yesterday's fix for an unlikely leak in the template interpreter
introduced a crash found by American Fuzzy Lop (AFL).
2021-03-03 10:19:31 -06:00
Nicolas Williams a0f542486e asn1: Fix open type decode crash (AFL)
Found with American Fuzzy Lop (AFL).
2021-03-03 10:19:31 -06:00
Nicolas Williams fb5ae095e9 asn1: Fix warnings 2021-03-03 10:15:18 -06:00
Nicolas Williams a68ccb6693 asn1: Add --raw-sequence option to asn1_print 2021-03-02 21:39:00 -06:00
Nicolas Williams f5d9ced33c asn1: Fix broken printing 2021-03-02 21:12:02 -06:00
Nicolas Williams 32974ac421 asn1: Fix leak in asn1_print 2021-03-02 20:56:16 -06:00
Nicolas Williams f780bdc244 asn1: Fix leaks in template printing 2021-03-02 20:55:55 -06:00
Nicolas Williams 8def829f30 asn1: Fix leaks in template decoding 2021-03-02 20:55:41 -06:00
Nicolas Williams 52b48de856 asn1: Further enhancements to asn1_print 2021-03-02 13:58:56 -06:00
Nicolas Williams 779848bf42 asn1: Fix JSON print bug for IMPORTed types 2021-03-02 13:37:40 -06:00
Nicolas Williams f58b145109 asn1: Make CSRs nicely printable (fixup) 2021-03-01 17:34:38 -06:00
Nicolas Williams e8fa948740 asn1: Minor JSON fix 2021-03-01 17:34:04 -06:00
Nicolas Williams e491521782 asn1: Fix Windows build 2021-03-01 16:29:23 -06:00