Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

RUSTSEC-2026-0401: Out-of-bounds read in `train_from_buffer` when sample sizes overflow

Closed Beginner friendly
#38 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
security

Research direction

Start by checking how this project depends on zstd-safe and whether its dictionary training path can pass untrusted sample sizes to train_from_buffer. Read the linked advisory and the cited zstd-rs fix for context. The issue says the flaw is fixed by summing sizes with overflow checks; done means confirming the affected dependency or call path is no longer vulnerable.

Written by the indexing model from the issue text.

Description

Out-of-bounds read in train_from_buffer when sample sizes overflow

Details
Status unsound
Package zstd-safe
Version 7.2.4
URL https://github.com/gyscos/zstd-rs/commit/781ea454191dbf178d09c1daf6fc896d15fbaa2f
Date 2026-10-16

ZDICT_trainFromBuffer is never told the length of the samples buffer, so
train_from_buffer checked that the sample sizes add up to it. With
overflow checks off, as in release builds, that sum wrapped around: sizes
totalling 2^64 plus the buffer length passed the check, and the trainer read
past the end of the buffer. zstd::dict::from_continuous relies on this
check from zstd 0.4.10; older versions of zstd had their own, covered by a
separate advisory.

This requires the sample sizes to come from an untrusted source. The flaw
was corrected by summing the sizes with overflow checks.

See advisory page for additional details.

Dominant language
Rust
Stars
2
Forks
0
Avg merge
1d 5h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stackabletech/stackable-odbc-trino

All issues in stackabletech/stackable-odbc-trino

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.