From ff384c3d46ee15a97ebfd2a31d404c30d13d1856 Mon Sep 17 00:00:00 2001 From: "Sergey \"Shnatsel\" Davidoff" Date: Tue, 2 Aug 2022 21:41:46 +0200 Subject: [PATCH] Initial advisory for owning_ref unsoundness (#1188) * Initial advisory for owning_ref unsoundness * move owning_ref advisory to a subfolder where it belongs * Add OwningRef::map is unsound to owning_ref Co-authored-by: pinkforest <36498018+pinkforest@users.noreply.github.com> --- crates/owning_ref/RUSTSEC-0000-0000.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 crates/owning_ref/RUSTSEC-0000-0000.md diff --git a/crates/owning_ref/RUSTSEC-0000-0000.md b/crates/owning_ref/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..5fdeda8 --- /dev/null +++ b/crates/owning_ref/RUSTSEC-0000-0000.md @@ -0,0 +1,20 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "owning_ref" +date = "2022-01-26" +url = "https://github.com/noamtashma/owning-ref-unsoundness" +references = ["https://github.com/Kimundi/owning-ref-rs/issues/49", "https://github.com/Kimundi/owning-ref-rs/issues/61", "https://github.com/Kimundi/owning-ref-rs/issues/71", "https://github.com/Kimundi/owning-ref-rs/issues/77"] +categories = ["memory-corruption"] + +[versions] +patched = [] +``` +# Multiple soundness issues in `owning_ref` + +- `OwningRef::map_with_owner` is [unsound](https://github.com/Kimundi/owning-ref-rs/issues/77) and may result in a use-after-free. +- `OwningRef::map` is [unsound](https://github.com/Kimundi/owning-ref-rs/issues/71) and may result in a use-after-free. +- `OwningRefMut::as_owner` and `OwningRefMut::as_owner_mut` are [unsound](https://github.com/Kimundi/owning-ref-rs/issues/61) and may result in a use-after-free. +- The crate [violates Rust's aliasing rules](https://github.com/Kimundi/owning-ref-rs/issues/49), which may cause miscompilations on recent compilers that emit the LLVM `noalias` attribute. + +No patched versions are available at this time. While a pull request with some fixes is outstanding, the maintainer appears to be unresponsive.