Add ascii advisory (#1618)

* Add ascii advisory

* Strip unnecessary comments

* Fix version range specification and category

* Change fixed version specification to `>= 0.9.3`

---------

Co-authored-by: Sergey "Shnatsel" Davidoff <shnatsel@gmail.com>
This commit is contained in:
Kisaragi
2023-02-25 23:30:18 +09:00
committed by GitHub
parent 0e63414bd1
commit 6e74bc0d18

View File

@@ -0,0 +1,19 @@
```toml
[advisory]
id = "RUSTSEC-0000-0000"
package = "ascii"
date = "2023-02-25"
url = "https://github.com/tomprogrammer/rust-ascii/issues/64"
informational = "unsound"
categories = ["memory-corruption"]
keywords = ["ascii"]
[versions]
patched = [">= 0.9.3"]
unaffected = ["<= 0.6.0"]
```
# Ascii allows out-of-bounds array indexing in safe code
Affected version of this crate had implementation of `From<&mut AsciiStr>` for `&mut [u8]` and `&mut str`. This can result in out-of-bounds array indexing in safe code.
The flaw was corrected in commit [8a6c779](https://github.com/tomprogrammer/rust-ascii/pull/63/commits/8a6c7798c202766bd57d70fb8d12739dd68fb9dc) by removing those impls.