Skip to content

[soap] reject self-referential schema group and attributeGroup fix-up - #285

Open
iliaal wants to merge 1 commit into
PHP-8.4from
fix/soap-schema-selfref-group-84
Open

[soap] reject self-referential schema group and attributeGroup fix-up#285
iliaal wants to merge 1 commit into
PHP-8.4from
fix/soap-schema-selfref-group-84

Conversation

@iliaal

@iliaal iliaal commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Parsing a WSDL whose schema contains a self-referential or (a group whose sequence references itself via a group ref, or the attributeGroup equivalent) overflowed the C stack in schema_content_model_fixup()/schema_attributegroup_fixup(), segfaulting the process. The schema fix-up pass now records each type it enters in a ctx->fixupInProgress set and raises a 'Parsing Schema: recursive ...' E_ERROR on re-entry, matching the style of the existing unresolved-ref errors; the sibling audit found the identical unguarded re-entry path in schema_attributegroup_fixup() and it is guarded by the same set. Reproduction segfaults all PHP-8.4 branches before the patch and now produces a catchable SoapFault, with two new tests and no failures across ext/soap/tests.

Schema fix-up now tracks types currently being fixed in ctx->fixupInProgress
and raises 'recursive group'/'recursive attributeGroup' errors on re-entry,
so a <group> or <attributeGroup> whose content model references itself can no
longer overflow the C stack during WSDL parsing; sibling audit found the same
unguarded re-entry path in schema_attributegroup_fixup() and it is guarded by
the same set.
@iliaal iliaal closed this Aug 24, 2026
@iliaal iliaal reopened this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant