DOG-008 CRIT: WEAVEParse/WEAVEStep trust wire indices — OOB read+write

dog/WEAVE.c's codec is a zero-copy, entirely UNVALIDATED view over a 'W' blob the header itself flags as "may be attacker-influenced", and the merge/next decoders then dereference the parsed inserter/remover indices as raw array subscripts. WEAVEStep reads a token's inserter straight from the 'I' column (WEAVE.c:165) and remover ids from 'M' (:174-176) with NO bound against the commit-table length; those indices flow into ordp[_ins]++ (ADV_IDH, WEAVE.c:410) — a controllable OOB WRITE — and into commits[0][li] / rmap[li] (wmerge_decode, :552,561,564) — OOB reads. Separately WEAVEParse aliases byte-aligned TLV values as tok32c*/u64c* (:55-58) with no length-multiple or alignment check, so a 'K'/'C' value of non-multiple length is read 1-3 bytes past its end and mis-aligned loads are UB. The sibling HUNKu8sDrain already does the right thing (validate tok32Offset, length, aligned copy) — this is the precedent to mirror. Method: Issues.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome