{"id":"RUSTSEC-2023-0020","summary":"const-cstr is Unmaintained","details":"Last release was about five years ago.\n\nThe maintainer(s) have been unreachable to respond to any issues that may or may not include security issues.\n\nThe repository is now archived and there is no security policy in place to contact the maintainer(s) otherwise.\n\nNo direct fork exist.\n\n# const-cstr is Unsound\n\nThe crate violates the safety contract of [ffi::CStr::from_bytes_with_nul_unchecked](https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked) used in `ConstCStr::as_cstr`\n\nNo interior nul bytes checking is done either by the constructor or the canonical macro to create the `ConstCStr`\n\n# const-cstr Panic\n\nAdditionally the crate may cause runtime panics if statically compiled and ran with any untrusted data that is not nul-terminated.\n\nThis is however unlikely but the the crate should not be used for untrusted data in context where panic may create a DoS vector.\n\n## Possible Alternatives\n\nThe below may or may not provide alternative(s)\n\n- [const_str::cstr!](https://docs.rs/const-str/latest/const_str/macro.cstr.html)\n- [cstr::cstr!](https://crates.io/crates/cstr)","modified":"2023-03-12T18:38:56Z","published":"2023-03-12T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/const-cstr"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2023-0020.html"},{"type":"WEB","url":"https://github.com/abonander/const-cstr"}],"affected":[{"package":{"name":"const-cstr","ecosystem":"crates.io","purl":"pkg:cargo/const-cstr"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"arch":[],"functions":[],"os":[]}},"database_specific":{"categories":[],"cvss":null,"informational":"unsound","source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2023-0020.json"}}],"schema_version":"1.7.3"}