Conversation
…oint FuzzEtreeRoundTripIdempotent asserted a one-round idempotence fixed point (f(f(x)) == f(x)). beevik/etree genuinely violates that for one infoset-invariant class: an empty CDATA section `<a><![CDATA[]]></a>` is the only XML construct that parses to a zero-length CharData node, which etree first serialises as `<a></a>` and then, on re-parse (the empty text is dropped), as `<a/>`. Both are the identical empty element, so this is a serialisation-spelling difference, not a parse divergence. Verified true positive, low severity: etree is transitive-only here (inside crewjam/saml + goxmldsig), and signature bytes on the SAML path are canonicalised by goxmldsig C14N — which always emits `<x></x>` and never self-closing — not by etree.WriteToBytes, so this flip-flop cannot reach canonicalised signature bytes. (See claude/2026-09-17-FINDING-etree-empty-cdata-nonidempotent-roundtrip.) Relax the property to a fixed point within TWO normalisation rounds (f(f(f(x))) == f(f(x))): s2 must be stable under one further round. This keeps the XSW-relevant strength — output etree cannot re-parse still fails (now checked on both rounds), and a serialiser that never reaches a fixed point (oscillation, or an infoset not stable under round-trip) still fails — while the benign spellings that settle on round 2 no longer false-positive. Adds the empty-CDATA and nested empty-CDATA inputs as permanent regression seeds. Verified: gofmt + go vet clean; seed corpus PASS (incl. the new seeds); 45s -fuzz burst PASS (143k execs, no crash). Signed-off-by: Andrei Beshkov <andrey.beshkov@gmail.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Relaxes
FuzzEtreeRoundTripIdempotent's idempotence property from a one-round fixedpoint (
f(f(x)) == f(x)) to a two-round fixed point (f(f(f(x))) == f(f(x))), and addsthe reproducer class as permanent regression seeds.
f = serialise∘parse.Why
The rig recorded a crash on
<a><![CDATA[]]></a>. Verified true positive, low severity:node. etree serialises the element holding it as
<a></a>, but re-parsing<a></a>dropsthe empty text →
<a/>. Both are the identical empty element — a serialisation-spellingdifference, not a parse divergence. It stabilises at
<a/>from round 2 on.crewjam/saml+goxmldsig); keyorix's SAMLwrapper never calls
etree.WriteToByteson a verify path. Signature bytes are canonicalisedby goxmldsig C14N, which always emits
<x></x>and never self-closing — so thisflip-flop cannot reach canonicalised signature bytes. No XSW/signature-bypass exposure.
Full triage:
claude/2026-09-17-FINDING-etree-empty-cdata-nonidempotent-roundtrip.md.Strength preserved
The two-round form still fails on what matters for XSW:
infoset not stable under round-trip) still fails.
Only the benign infoset-invariant spellings that settle on round 2 stop false-positing.
Verification
gofmt+go vetclean.<a><![CDATA[]]></a>and nested regression seeds.-fuzzburst PASS (143k execs, no crash) against the live corpus under the new assertion.