fix: mask signer row operand to low byte#2778
Conversation
`subParserSigners` extracted the full 16-bit operand as the context row, so operands ≥ 256 silently wrapped at the EVM word boundary instead of being clamped to the intended 0-255 range. Apply `& 0xFF` to pin the row to the low byte and add a regression test (`signer<256>()` resolves to row 0). Pre-pins 0.1.13 deploy constants (SubParser address changes, all other contracts unchanged). Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthrough
ChangesSigner operand masking fix
0.1.13 deployment constants
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude <noreply@anthropic.com>
Summary
subParserSignersread the full 16-bitOperandV2value as the context row index, sosigner<256>()silently resolved to the same row assigner<0>()(256 mod 256 = 0 at the EVM word level) but only by accident — larger values could land on entirely wrong rows.& 0xFFto clamp the operand to the intended 0–255 range before passing it toLibSubParse.subParserContext.testSubParserContextSignerRowMaskLowByteverifiessigner<256>()resolves to row 0.REQUIRES redeploy at land — the SubParser bytecode changes, so it must be redeployed to its new CREATE2 address before
testProdDeploy*goes green.Closes #2653
Co-Authored-By: Claude noreply@anthropic.com
Summary by CodeRabbit
New Features
Bug Fixes
Tests