out_reference::Out::from_raw should be unsafe (#1627)

* `out_reference::Out::from_raw` should be `unsafe`

* Update crates/out-reference/RUSTSEC-0000-0000.md

Adjust date when it was reported

* Minor fix

---------

Co-authored-by: pinkforest(she/her) <36498018+pinkforest@users.noreply.github.com>
This commit is contained in:
Nugine
2023-03-12 14:51:05 +08:00
committed by GitHub
parent ffe539ba4d
commit 84b7ddd280

View File

@@ -0,0 +1,23 @@
```toml
[advisory]
id = "RUSTSEC-0000-0000"
package = "out-reference"
date = "2021-01-20"
url = "https://github.com/RustyYato/out-ref/issues/1"
informational = "unsound"
categories = ["memory-corruption"]
keywords = ["unsound", "raw-pointer"]
[versions]
patched = [">= 0.2.0"]
unaffected = ["< 0.1.0"]
[affected.functions]
"out_reference::Out::from_raw" = [">= 0.1.0, < 0.2.0"]
```
# `out_reference::Out::from_raw` should be `unsafe`
`Out::from_raw` in affected versions allows writing a value to invalid memory address without requiring `unsafe`.
The soundness issue has been addressed by making `Out::from_raw` an unsafe function.