Skip to content

cics stub: WEB SEND / CONVERSE accept a length that fits the GETMAIN block the pointer was SET onto (Part of #6839) - #7327

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6839-20261031T1621Z
Oct 31, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6839-20261031T1621Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6839 (slice for the get-segmented scenario; the scenario follows in a later PR).

What

The COBOL oracle stub refused WEB SEND when FROMLENGTH exceeded the declared FROM record ("WEB SEND length beyond its area", ggcics_web.c:526). IBM reads FROM from the address for FROMLENGTH bytes, so a record whose pointer was SET onto a larger GETMAIN block (ZECS001 GETSEG01: CACHE-MESSAGE X(32000) over a 64000 block, 32004 bytes sent) is valid. The stub now bounds the length by the declared area OR the live task-storage block holding the address (blk_room in ggcics.c, web_area in ggcics_web.c). Nothing loosened: a length past the block's end, a record on no block, and a FREEMAINed block are still refused.

Class / Sibling gaps

Class: a WEB command's input argument whose length is checked against its declared area, when a pointer SET onto a larger block makes that check wrong (IBM reads from the address). Covered here, same mechanism: WEB SEND FROM, WEB CONVERSE FROM / PATH / QUERY. Tests: block start, block end, past block end, mid-block pointer (rest of the block only), no block, freed block, for SEND and CONVERSE.
Sibling gaps: WEB PARSE URL (ggcics_web.c ~l.338, URL input) has the same shape but its own n >= WEB_TXT bound, so it needs a separate decision; WEB EXTRACT / READ HTTPHEADER / WRITE HTTPHEADER name and value checks are other mechanisms (outputs, or tiny names). The get-segmented scenario (closes 1144:true, 1194:false, 1197:true) is the next slice.

Gates

pr_gates --fast 9/9, --ratchets 9/9, test_cics_family_split / test_cics_runtimes / test_equivalence_cics pass, time ratchet clean. No golden re-bless: stub-only, no engine code. Hand-written files: 3.

Cross-repo: none.

Co-Authored-By: Claude Sonnet 5.5 [email protected]

🤖 Generated with Claude Code

…block the pointer was SET onto (Part of #6839)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 31, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit c93b8b7 into main Oct 31, 2026
73 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6839-20261031T1621Z branch October 31, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant