Skip to content

ivory v0.3.1

Latest

Choose a tag to compare

@DominicBreuker DominicBreuker released this 24 Oct 10:28
3b45fa7

Changed: the XML parser behind tsl rejects malformed markup
that Go's encoding/xml lets through: an XML declaration with missing,
repeated or misordered pseudo-attributes or not at the start of the
document, a processing instruction target with a colon or without white
space after it, CDATA after the root element, attributes without white
space between them or with an empty prefix or local name, character
references to surrogates or other characters XML forbids (encoding/xml
reads them as U+FFFD), and namespace names that are not absolute URIs.
No genuine TSL contains them; libxml2 rejects them or can't
canonicalize them.

Documentation: the README, SECURITY.md, the user guide and the
security notes say plainly that ivory is experimental and not ready for
production use in the TI, and that you should have an independent
security review done yourself before you adopt it; docs/security.md
lists what that review should cover.

Tests: new fuzz target tsl:FuzzVerifiedTSL: a TSL that verifies
against the test trust anchor must read exactly as the signed one (no
signature wrapping, no gap between what is signed and what is read);
tsl.TestSignedEdits pins 24 such edits. tsl.TestParseElementEdits
removes every element of a signed TSL in turn and checks that parsing
never panics; FuzzParse starts from the variants that pass the schema
check. New tests for the XML parser's well-formedness rules and depth
limit, the XML signature's structure rules, OCSP responses signed with
RSA-PSS, CertID matching, revocation reasons, ti's 24-hour session
limit to the second, and the parts of Go's session encoding that ti
reads. scripts/run-tls-anvil.sh runs TLS-Anvil's RFC 5246 and RFC
8446 tests against stock Go and against ivory, as server and client,
with and without Brainpool, and fails when ivory's results differ from
stock Go's in a way that isn't listed; the first runs show no
difference beyond what TLS-Anvil can't test with Brainpool (see
interop/README.md). TestLibxml2 in internal/xmldsig compares the
parser and the exclusive canonicalization with libxml2 (through lxml)
on generated hostile XML, the TSL corpora and fuzz corpora; it found
the malformed markup above.

Tooling: ivory-overlay tipcheck reads context: old => new lines
in overlay/tip-rewrites.txt: they rewrite the lines a patch expects in
the tree before it is applied, for a line next to a patch's change that
changed on Go's development branch. It now also lists the rejected hunks
when a patch doesn't apply.