همهٔ گزارش‌ها
متوسط

MutexGuard::map can cause a data race in safe code

متن اصلی

نسخه‌های متأثر

بازه‌ها نیاز به بررسی دارند.

Rust / Cargofutures-util
نسخه‌های متأثر
>=0.3.2 <0.3.7
نسخهٔ اصلاح‌شده
0.3.7
Rust / Cargofutures-util
نسخه‌های متأثر
>= 0.3.2, < 0.3.7
نسخهٔ اصلاح‌شده
0.3.7

بهره‌برداری

CVE-2020-35905

احتمال بهره‌برداری در ۳۰ روز آینده: 0.26%

FIRST EPSS · ۱۴۰۵/۰۸/۲۹

شرح آسیب‌پذیری

Affected versions of the crate had a Send/Sync implementation for MappedMutexGuard that only considered variance on T, while MappedMutexGuard dereferenced to U.

This could of led to data races in safe Rust code when a closure used in MutexGuard::map() returns U that is unrelated to T.

The issue was fixed by fixing Send and Sync implementations, and by adding a PhantomData<&'a mut U> marker to the MappedMutexGuard type to tell the compiler that the guard is over U too.

پیوندها