You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c8d42d8
Browse filesBrowse the repository at this point in the historyBrowse files
Fix excessive memory allocation from crafted container headers
A container header carries an element count that the unpacker used to
pre-allocate the Array or Hash. The count is capped at SHRT_MAX per
container, but nested containers each pre-allocate up to that cap, so a
small crafted message of deeply nested headers could still force a large
allocation, and a streaming Unpacker holds it until the connection ends.
An element needs at least one byte, so a container cannot hold more
elements than there are bytes left to read. Cap the initial size by the
buffered size as well; the container still grows as more data arrives.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments