Closed
Description
rust/library/std/src/io/mod.rs
Lines 358 to 403 in c97f11a
At line 393, the guard object's .len
field is incremented by the value returned from a read implementation. If a questionable Read
returns a value larger than the buffer size, it will take that value and set the length of the vector over the boundary.
This bug is reachable from Read::read_to_end()
and Read::read_to_string()
.
Here is a playground link that demonstrates the bug. It segfaults with double free or corruption (out)
.
Metadata
Metadata
Assignees
Labels
Area: `std::io`, `std::fs`, `std::net` and `std::path`Category: This is a bug.Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessCritical priorityRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.