{"id":"GHSA-3mv5-343c-w2qg","aliases":["GHSA-rjhf-4mh8-9xjq","RUSTSEC-2023-0074"],"status":"published","title":"Ref methods into_ref, into_mut, into_slice, and into_slice_mut are unsound when used with cell::Ref or cell::RefMut","description":"*This advisory is also published as [RUSTSEC-2023-0074](https://rustsec.org/advisories/RUSTSEC-2023-0074.html).*\n\nThe `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound and may allow safe code to exhibit undefined behavior when used with `Ref\u003cB, T\u003e` where `B` is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or [`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.\n\nSee https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.\n\nThe current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2023-12-14T12:00:00Z","modified":"2024-02-12T15:57:50Z","fixes":[{"ecosystem":"crates.io","package":"zerocopy","fixed_in":["0.2.9","0.3.2","0.4.1","0.5.2","0.6.6","0.7.31"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2.2"},{"fixed":"0.2.9"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.3.0"},{"fixed":"0.3.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.4.0"},{"last_affected":"0.4.0"},{"fixed":"0.4.1"}]}],"versions":["0.4.0"]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.5.0"},{"fixed":"0.5.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.6.0"},{"fixed":"0.6.6"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.7.0"},{"fixed":"0.7.31"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2.2"},{"fixed":"0.2.9"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.3.0"},{"fixed":"0.3.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.4.0"},{"fixed":"0.4.1"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.5.0"},{"fixed":"0.5.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.6.0"},{"fixed":"0.6.6"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.7.0"},{"fixed":"0.7.31"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.2"},{"fixed":"0.2.9"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.0"},{"fixed":"0.3.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.4.0"},{"fixed":"0.4.1"}]}],"versions":["0.4.0"]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.5.0"},{"fixed":"0.5.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.6.0"},{"fixed":"0.6.6"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.7.0"},{"fixed":"0.7.31"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.2"},{"fixed":"0.2.9"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.0"},{"fixed":"0.3.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.4.0"},{"fixed":"0.4.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.5.0"},{"fixed":"0.5.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.6.0"},{"fixed":"0.6.6"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.7.0"},{"fixed":"0.7.31"}]}]},{"source":"osv","ecosystem":"crates.io","package":"zerocopy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.2"},{"fixed":"0.2.9"},{"introduced":"0.3.0"},{"fixed":"0.3.2"},{"introduced":"0.4.0"},{"fixed":"0.4.1"},{"introduced":"0.5.0"},{"fixed":"0.5.2"},{"introduced":"0.6.0"},{"fixed":"0.6.6"},{"introduced":"0.7.0"},{"fixed":"0.7.31"}]}]}],"references":[{"url":"https://github.com/google/zerocopy/security/advisories/GHSA-3mv5-343c-w2qg","tags":["web"]},{"url":"https://github.com/google/zerocopy/issues/679","tags":["web"]},{"url":"https://github.com/google/zerocopy/issues/716","tags":["web","report"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0074.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-3mv5-343c-w2qg"},{"url":"https://github.com/google/zerocopy/issues/71","tags":["web"]},{"url":"https://github.com/advisories/GHSA-rjhf-4mh8-9xjq"},{"url":"https://github.com/google/zerocopy","tags":["package"]},{"url":"https://crates.io/crates/zerocopy","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-3mv5-343c-w2qg","title":"Ref methods into_ref, into_mut, into_slice, and into_slice_mut are unsound when used with cell::Ref or cell::RefMut","description":"*This advisory is also published as [RUSTSEC-2023-0074](https://rustsec.org/advisories/RUSTSEC-2023-0074.html).*\n\nThe `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound and may allow safe code to exhibit undefined behavior when used with `Ref\u003cB, T\u003e` where `B` is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or [`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.\n\nSee https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.\n\nThe current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.\n","status":"published","published":"2023-12-15T03:48:38Z","modified":"2023-12-18T17:40:52Z","updated_at":"2026-11-02T14:37:26.727664Z"},{"id":"GHSA-rjhf-4mh8-9xjq","title":"Zerocopy: Some Ref methods are unsound with some type parameters","description":"The `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound and may allow safe code to exhibit undefined behavior when used with `Ref\u003cB, T\u003e` where `B` is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or [`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.\n\nSee https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.\n\nThe current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.\n","status":"published","published":"2023-12-18T19:18:46Z","modified":"2023-12-18T19:18:49Z","updated_at":"2026-11-02T14:37:26.727664Z"}],"osv":[{"id":"GHSA-3mv5-343c-w2qg","title":"Ref methods into_ref, into_mut, into_slice, and into_slice_mut are unsound when used with cell::Ref or cell::RefMut","description":"*This advisory is also published as [RUSTSEC-2023-0074](https://rustsec.org/advisories/RUSTSEC-2023-0074.html).*\n\nThe `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound and may allow safe code to exhibit undefined behavior when used with `Ref\u003cB, T\u003e` where `B` is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or [`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.\n\nSee https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.\n\nThe current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.\n","status":"published","published":"2023-12-15T03:48:38Z","modified":"2024-02-12T15:57:36Z","updated_at":"2026-11-02T15:46:35.747385Z"},{"id":"GHSA-rjhf-4mh8-9xjq","title":"Zerocopy: Some Ref methods are unsound with some type parameters","description":"The `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound and may allow safe code to exhibit undefined behavior when used with `Ref\u003cB, T\u003e` where `B` is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or [`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.\n\nSee https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.\n\nThe current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.\n","status":"published","published":"2023-12-18T19:18:46Z","modified":"2024-02-12T15:57:50Z","updated_at":"2026-11-02T15:46:55.877614Z"},{"id":"RUSTSEC-2023-0074","title":"Some Ref methods are unsound with some type parameters","description":"The `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound\nand may allow safe code to exhibit undefined behavior when used with `Ref\u003cB, T\u003e` where `B`\nis [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or\n[`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these\nmethods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.\n\nSee https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.\n\nThe current plan is to yank the affected versions soon. See\nhttps://github.com/google/zerocopy/issues/679 for more detail.","status":"published","published":"2023-12-14T12:00:00Z","modified":"2024-02-10T16:26:48.08699Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
