Find TSQ reads that exceed their buffers

Proprietary

Compare an exactly established READQ TS input LENGTH with its complete top-level INTO allocation. Support ordinary local PIC X fields and exact DISPLAY records up to 32767 bytes. Require signed halfword binary LENGTH, explicit ITEM and QUEUE or QNAME. Validate RESP when present without adding or changing handler options. A later response check cannot prevent an earlier oversized write. Use bounded local integer assignments and supported performed paragraphs to establish the request. Earlier EXEC islands and unknown effects prevent reuse of local values. Report CWE-120 only when a positive request no greater than 32763 exceeds the complete allocation. Record the smallest possible queue record that would exceed the buffer. This is conditional on reading such a record. Queue contents, execution reachability and an actual overwrite are not established. Slices, tables, subfields of larger records, aliases, incomplete layouts and unsupported commands require further analysis. REPOSITORY declarations in the current or enclosing program prevent intrinsic function assumptions. Report the intended record size and approved failure behavior as missing remediation evidence. Do not resize storage, reduce lengths or change queue behavior.

io.moderne.mainframe.security.FindOversizedTsqReads
mod run . --recipe=io.moderne.mainframe.security.FindOversizedTsqReads

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.