VYPR
Moderate severityNVD Advisory· Published Jan 22, 2021· Updated Aug 4, 2024

CVE-2020-36216

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.

PackageAffected versionsPatched versions
eventiocrates.io
< 0.5.10.5.1

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"Missing `R: Send` trait bound on the unsafe `Send` implementation for `Input&lt;R&gt;` 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&lt;R&gt;` wrapping a `Read` implementation that contains a non-`Send` (and non-`Sync`) object, such as `Rc&lt;Cell&lt;usize&gt;&gt;` [ref_id=1]. Because `Input&lt;R&gt;` 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&lt;Cell&lt;usize&gt;&gt;`, causing the `Cell` to hold an incorrect count [ref_id=1].

Affected code

The vulnerability is in the `Input&lt;R&gt;` 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&lt;R&gt;` without requiring `R: Send` [ref_id=1]. This allows a non-`Send` type (such as `Rc&lt;Cell&lt;usize&gt;&gt;`) to be sent across threads inside `Input&lt;R&gt;`.

What the fix does

The fix adds the trait bound `R: Send` to the unsafe `Send` implementation for `Input&lt;R&gt;`, changing it from `unsafe impl&lt;R: Read&gt; Send for Input&lt;R&gt; {}` to `unsafe impl&lt;R: Read + Send&gt; Send for Input&lt;R&gt; {}` [ref_id=1]. This ensures the compiler rejects any attempt to send an `Input&lt;R&gt;` 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&lt;Cell&lt;usize&gt;&gt;`, 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

News mentions

0

No linked articles in our index yet.