Data races in noise_search
Moderate severity
GitHub Reviewed
Published
Aug 25, 2021
to the GitHub Advisory Database
•
Updated Feb 1, 2023
Description
Published by the National Vulnerability Database
Aug 8, 2021
Reviewed
Aug 18, 2021
Published to the GitHub Advisory Database
Aug 25, 2021
Last updated
Feb 1, 2023
Affected versions of the
noise_searchcrate unconditionally implement Send/Sync forMvccRwLock.This can lead to data races when types that are either
!Sendor!Sync(e.g.Rc<T>,Arc<Cell<_>>) are contained insideMvccRwLockand sent across thread boundaries. The data races can potentially lead to memory corruption (as demonstrated in the PoC from the original report issue).Also, safe APIs of
MvccRwLockallow aliasing violations by allowing&TandLockResult<MutexGuard<Box<T>>>to co-exist in conflicting lifetime regions. The APIs ofMvccRwLockshould either be marked asunsafeorMbccRwLockshould be changed to private or pub(crate).References