Skip to content

Validate the body length of binary responses before reading the value - #185

Merged
aisk merged 1 commit into
masterfrom
fix-binary-body-length
Sep 8, 2026
Merged

Validate the body length of binary responses before reading the value#185
aisk merged 1 commit into
masterfrom
fix-binary-body-length

Conversation

@aisk

@aisk aisk commented Sep 8, 2026

Copy link
Copy Markdown
Owner

parse_response subtracted the key and extras length from total_body_length unchecked, so a corrupted header underflowed and panicked in debug or tried to allocate about 4GB in release. It now returns a BadResponse error, which also marks the connection as broken.

@aisk
aisk merged commit f224d9a into master Sep 8, 2026
1 check passed
@aisk
aisk deleted the fix-binary-body-length branch September 8, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant