CVE-2020-36216
Description
The eventio crate's Input incorrectly implements Send, allowing non-Send types to be sent across threads, leading to data races and memory corruption.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The eventio crate's Input incorrectly implements Send, allowing non-Send types to be sent across threads, leading to data races and memory corruption.
The eventio crate provides event I/O processors for Rust. The Input struct unconditionally implements the Send trait via an unsafe impl, even when the inner type R is not Send. This violates Rust's thread safety guarantees and can lead to data races and memory corruption [1][2].
An attacker can exploit this by constructing a program where Input wraps a non-Send type, such as Rc<Cell>, and sends it to another thread. Multiple threads can then concurrently access the non-Sync object, causing a data race. The GitHub issue provides a proof of concept using a custom Read type that contains an Rc<Cell> [2].
The impact includes memory corruption and undefined behavior. The RustSec advisory rates this vulnerability as CVSS 5.9 (Medium) with high availability impact, though confidentiality and integrity are not directly affected [3].
The issue is fixed in eventio version 0.5.1 and later. Users should update to the patched version to mitigate the vulnerability [3][4].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
eventiocrates.io | < 0.5.1 | 0.5.1 |
Affected products
2- Rust/eventiodescription
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"Missing `R: Send` trait bound on the unsafe `Send` implementation for `Input<R>` allows a non-Send type to be sent across threads, enabling data races."
Attack vector
An attacker who controls code that uses the eventio crate can construct an `Input<R>` wrapping a `Read` implementation that contains a non-`Send` (and non-`Sync`) object, such as `Rc<Cell<usize>>` [ref_id=1]. Because `Input<R>` unconditionally implements `Send`, this object can be moved to multiple threads. Multiple threads then concurrently call `read()` on the same non-`Sync` object, producing a data race and memory corruption [CWE-662] [CWE-787]. The proof of concept demonstrates this by spawning 8 threads that each run `input.run()` on an `Input` sharing the same `Rc<Cell<usize>>`, causing the `Cell` to hold an incorrect count [ref_id=1].
Affected code
The vulnerability is in the `Input<R>` struct in the eventio crate (before version 0.5.1). The unsafe `Send` implementation at `src/pcap.rs:22:1: 22:55` unconditionally implements `Send` for `Input<R>` without requiring `R: Send` [ref_id=1]. This allows a non-`Send` type (such as `Rc<Cell<usize>>`) to be sent across threads inside `Input<R>`.
What the fix does
The fix adds the trait bound `R: Send` to the unsafe `Send` implementation for `Input<R>`, changing it from `unsafe impl<R: Read> Send for Input<R> {}` to `unsafe impl<R: Read + Send> Send for Input<R> {}` [ref_id=1]. This ensures the compiler rejects any attempt to send an `Input<R>` to another thread when `R` is not `Send`, preventing the data race at compile time. No patch file is included in the bundle, but the suggested solution from the advisory is the authoritative remediation guidance [ref_id=1].
Preconditions
- inputThe attacker must be able to construct an Input wrapping a Read implementation that contains a non-Send type (e.g., Rc<Cell>).
- networkThe attacker must be able to move the Input to multiple threads (e.g., via thread::spawn).
Reproduction
Use the proof-of-concept program provided in the advisory [ref_id=1]. Compile and run the Rust program that creates a `CustomRead` containing an `Rc<Cell<usize>>`, wraps it in `pcap::Input::with_read`, spawns 8 threads each calling `input.run()`, and then asserts that the atomic counter matches the `Cell` counter — the assertion fails because the `Cell` is corrupted by concurrent access across threads.
Generated on May 27, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-69vj-xx27-g45wghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-36216ghsaADVISORY
- github.com/petabi/eventio/issues/33ghsaWEB
- rustsec.org/advisories/RUSTSEC-2020-0108.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.