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

zerovec-derive incorrectly uses `#[repr(packed)]`

متن اصلی

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

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

Rust / Cargozerovec-derive
نسخه‌های متأثر
>= 0.10.0, < 0.10.3
نسخهٔ اصلاح‌شده
0.10.3
Rust / Cargozerovec-derive
نسخه‌های متأثر
< 0.9.7
نسخهٔ اصلاح‌شده
0.9.7
Rust / Cargozerovec-derive
نسخه‌های متأثر
>=0.0.0-0 <0.9.7 || >=0.10.0 <0.10.3
نسخهٔ اصلاح‌شده
0.10.3 · 0.9.7

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

The affected versions make unsafe memory accesses under the assumption that #[repr(packed)] has a guaranteed field order.

The Rust specification does not guarantee this, and https://github.com/rust-lang/rust/pull/125360 (1.80.0-beta) starts reordering fields of #[repr(packed)] structs, leading to illegal memory accesses.

The patched versions 0.9.7 and 0.10.3 use #[repr(C, packed)], which guarantees field order.

پیوندها

گزارش‌دهندگان

  • hikiko4ern