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

A self-referential or in a WSDL schema overflowed the C stack in schema_content_model_fixup()/schema_attributegroup_fixup() and segfaulted the process. A ctx->fixupInProgress set now records each type the fix-up pass enters and raises a 'Parsing Schema: recursive ...' E_ERROR on re-entry; a sibling audit found the identical unguarded re-entry in schema_attributegroup_fixup(), which the same set now guards. Two new tests cover both shapes: the reproduction segfaults PHP-8.4 branches without the patch and produces a catchable SoapFault with it.

@iliaal iliaal closed this Aug 24, 2026
@iliaal iliaal reopened this Aug 24, 2026
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 force-pushed the fix/soap-schema-selfref-group-84 branch from c3dccbf to 4d879fc Compare August 26, 2026 12:45
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