Skip to content

test: pin the negative-offset ReadBytes attack vector#75

Merged
CoreyRDean merged 1 commit into
developfrom
test/readbytes-negative-offset
May 30, 2026
Merged

test: pin the negative-offset ReadBytes attack vector#75
CoreyRDean merged 1 commit into
developfrom
test/readbytes-negative-offset

Conversation

@CoreyRDean
Copy link
Copy Markdown
Collaborator

Follow-up to #74 applying the review suggestion: add a regression test for the second documented out-of-bounds vector — a negative offset with a compensating count (offset=-4, count=8), whose composite index offset+count-1=3 looked in range before the fix and read into data-4 (OOB underflow). The independent start-offset check added in #74 rejects it; this block makes that vector non-regressable. Test-only; verified passing under blitzcc -t.

🤖 Generated with Claude Code

Follow-up to #74. The negative-count vector is directly tested; this adds the
second documented vector — a negative offset with a compensating count
(offset=-4, count=8) whose composite index offset+count-1=3 looked in range
pre-fix, causing an OOB underflow read. The new independent start-offset check
rejects it; this block makes that vector non-regressable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CoreyRDean CoreyRDean requested a review from a team as a code owner May 30, 2026 02:32
@CoreyRDean CoreyRDean added the bug Something isn't working label May 30, 2026
@CoreyRDean CoreyRDean merged commit 192e7bf into develop May 30, 2026
4 checks passed
@CoreyRDean CoreyRDean deleted the test/readbytes-negative-offset branch May 30, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant