Skip to content

RUSTSEC-2026-0405: Out-of-bounds read with an out-of-range InBuffer::pos #34

Closed

Description

@github-actions

Out-of-bounds read with an out-of-range InBuffer::pos

Details
Status unsound
Package zstd-safe
Version 7.2.4
URL gyscos/zstd-rs@20d397c
Date 2026-10-16

InBuffer's fields are public, so safe code can set pos past the end of
src. The position was passed to the C library unchecked, and
ZSTD_seekable_compressStream, unlike the other streaming functions, does
not validate it: it read past the end of the input slice, by up to the
frame size, and compressed that memory into the output.

The flaw was corrected by checking the position before every call into the
C library.

See advisory page for additional details.

Activity

  1. adwk67 commented on Oct 27, 2026

    @adwk67
    Member

    fixed by #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions