diff --git a/crates/arc-swap/RUSTSEC-0000-0000.md b/crates/arc-swap/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..b9a1f61 --- /dev/null +++ b/crates/arc-swap/RUSTSEC-0000-0000.md @@ -0,0 +1,25 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "arc-swap" +date = "2020-12-10" +url = "https://github.com/vorner/arc-swap/issues/45" +categories = ["memory-corruption"] +keywords = ["dangling reference"] + +[versions] +patched = [">= 1.1.0", ">= 0.4.8"] +unaffected = ["< 0.4.2"] + +[affected] +functions = { "arc_swap::access::MapGuard::deref" = ["< 1.1.0"] } +``` + +# Dangling reference in `access::Map` with Constant + +Using the `arc_swap::access::Map` with the `Constant` test helper (or with +user-provided implementation of the `Access` trait) could sometimes lead to the +map returning dangling references. + +Replaced by implementation without `unsafe`, at the cost of added `Clone` bound +on the closure and small penalty on performance.