crossbeam-utils Unsoundness of AtomicCell<{i,u}64> arithmetics on 32-bit targets that support Atomic{I,U}64
High severity
GitHub Reviewed
Published
Feb 14, 2022
in
crossbeam-rs/crossbeam
•
Updated Feb 4, 2025
Description
Published by the National Vulnerability Database
Feb 15, 2022
Published to the GitHub Advisory Database
Feb 16, 2022
Reviewed
Feb 16, 2022
Last updated
Feb 4, 2025
Impact
The affected versions of this crate incorrectly assumed that the alignment of
{i,u}64was always the same asAtomic{I,U}64.However, the alignment of
{i,u}64on a 32-bit target can be smaller thanAtomic{I,U}64.This can cause the following problems:
Crates using
fetch_*methods withAtomicCell<{i,u}64>are affected by this issue.32-bit targets without
Atomic{I,U}64and 64-bit targets are not affected by this issue.32-bit targets with
Atomic{I,U}64and{i,u}64have the same alignment are also not affected by this issue.The following is a complete list of the builtin targets that may be affected. (last update: nightly-2022-02-11)
(script to get list)
Patches
This has been fixed in crossbeam-utils 0.8.7.
Affected 0.8.x releases have been yanked.
References
crossbeam-rs/crossbeam#781
License
This advisory is in the public domain.
References