From 79ded1e524bbab1fe404994374b6f79b50fb7871 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 23 Apr 2023 20:34:00 +0000 Subject: [PATCH] Update OSV exported data --- crates/RUSTSEC-2023-0035.json | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 crates/RUSTSEC-2023-0035.json diff --git a/crates/RUSTSEC-2023-0035.json b/crates/RUSTSEC-2023-0035.json new file mode 100644 index 000000000..af7f5a0b3 --- /dev/null +++ b/crates/RUSTSEC-2023-0035.json @@ -0,0 +1,57 @@ +{ + "id": "RUSTSEC-2023-0035", + "modified": "2023-04-23T20:33:42Z", + "published": "2023-04-17T12:00:00Z", + "aliases": [], + "related": [], + "summary": "Adverserial use of `make_bitflags!` macro can cause undefined behavior", + "details": "The macro relied on an expression of the form `Enum::Variant` always being a\nvariant of the enum. However, it may also be an associated integer constant, in\nwhich case there's no guarantee that the value of said constant consists only of\nbits valid for this bitflag type.\n\nThus, code like this could create an invalid `BitFlags`, which would cause\niterating over it to trigger undefined behavior. As the debug formatter\ninternally iterates over the value, it is also affected.\n\n```rust\nuse enumflags2::{bitflags, make_bitflags};\n\n#[bitflags]\n#[repr(u8)]\n#[derive(Copy, Clone, Debug)]\nenum Test {\n A = 1,\n B = 2,\n}\n\nimpl Test {\n const C: u8 = 69;\n}\n\nfn main() {\n let x = make_bitflags!(Test::{C});\n // printing or iterating over x is UB\n}\n```", + "affected": [ + { + "package": { + "ecosystem": "crates.io", + "name": "enumflags2", + "purl": "pkg:cargo/enumflags2" + }, + "ecosystem_specific": { + "affects": { + "arch": [], + "os": [], + "functions": [] + } + }, + "database_specific": { + "categories": [], + "cvss": null, + "informational": "unsound" + }, + "ranges": [ + { + "type": "SEMVER", + "events": [ + { + "introduced": "0.7.0" + }, + { + "fixed": "0.7.7" + } + ] + } + ] + } + ], + "references": [ + { + "type": "PACKAGE", + "url": "https://crates.io/crates/enumflags2" + }, + { + "type": "ADVISORY", + "url": "https://rustsec.org/advisories/RUSTSEC-2023-0035.html" + }, + { + "type": "WEB", + "url": "https://github.com/meithecatte/enumflags2/releases/tag/v0.7.7" + } + ] +} \ No newline at end of file