# GHSA-6888-WF7J-34JQ: SegQueue creates zero value of any type

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2022-06-16
- Modified: 2023-11-08

## Also published as

- [RUSTSEC-2022-0021](https://cve.now/RUSTSEC-2022-0021.md) (RustSec)

## Affected versions

- crossbeam-queue (crates.io): fixed in 0.2.3

## Description

Affected versions of this crate called `mem::zeroed()` to create values of a user-supplied type `T`.
This is unsound e.g. if `T` is a reference type (which must be non-null).
 
The flaw was corrected by avoiding the use of `mem::zeroed()`, using `MaybeUninit` instead.

## References

- https://github.com/crossbeam-rs/crossbeam/pull/458
- https://github.com/crossbeam-rs/crossbeam
- https://rustsec.org/advisories/RUSTSEC-2022-0021.html

Page: https://cve.now/GHSA-6888-WF7J-34JQ

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
