{"id":"RUSTSEC-2020-0029","summary":"Allows viewing and modifying arbitrary structs as bytes","details":"Affected versions of rgb crate allow viewing and modifying data of any type `T` wrapped in `RGB\u003cT\u003e` as bytes,\nand do not correctly constrain `RGB\u003cT\u003e` and other wrapper structures to the types for which it is safe to do so.\n\nSafety violation possible for a type wrapped in `RGB\u003cT\u003e` and similar wrapper structures:\n\n * If `T` contains padding, viewing it as bytes may lead to exposure of contents of uninitialized memory.\n * If `T` contains a pointer, modifying it as bytes may lead to dereferencing of arbitrary pointers.\n * Any safety and/or validity invariants for `T` may be violated.\n \nThe issue was resolved by requiring all types wrapped in structures provided by RGB crate to implement an unsafe marker trait.","aliases":["CVE-2020-25016","GHSA-g4rw-8m5q-6453"],"modified":"2023-11-08T04:03:09.114958Z","published":"2020-06-14T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/rgb"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2020-0029.html"},{"type":"REPORT","url":"https://github.com/kornelski/rust-rgb/issues/35"}],"affected":[{"package":{"name":"rgb","ecosystem":"crates.io","purl":"pkg:cargo/rgb"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.5.4"},{"fixed":"0.8.20"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"functions":[],"arch":[],"os":[]}},"database_specific":{"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2020-0029.json","cvss":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","informational":"unsound","categories":[]}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"}]}