You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Hook edited this page Aug 3, 2026
·
1 revision
Title: OER parser recurses without depth limit on self-referential IEEE 1609.2 schema.
Issue affecting: BC before 1.85 (from 1.70), BC-LTS before 2.73.12, BC-FJA before bcutil-fips 2.0.7 and 2.1.7.
Fixed versions: BC 1.85, BC-LTS 2.73.12, BC-FJA bcutil-fips 2.0.7 and 2.1.7.
Platform affected: Java 8 and later.
Bouncy Castle's OERInputStream.parse(Element) walks SEQ/CHOICE/Supplier children recursively with no depth counter. The bundled IEEE 1609.2 schema defines a cycle Ieee1609Dot2Data -> Ieee1609Dot2Content(signedData) -> SignedData -> ToBeSignedData -> SignedDataPayload -> Ieee1609Dot2Data via deferred(...).mayRecurse(true), and the mayRecurse flag is only checked by test tooling, not the runtime parser. Public entry points ETSISignedData(byte[]) and ETSIEncryptedData(byte[]) invoke this parser on untrusted bytes before any signature verification. An attacker can craft a ~2-4 KB message with hundreds of nested signedData payloads; each cycle costs ~4-5 input bytes but ~5 Java stack frames, so parsing throws StackOverflowError and crashes the thread/JVM.