CVE-2021-26958
mediumPriorität · verfolgen · 36EPSS 0.016 · 76. PerzentilEUUSEPSS · bewertet 2026-10-26
An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because transmutation to the wrong type can happen after xcb::base::cast_event uses std::mem::transmute to return a reference to an arbitrary type.
cvss
Technischer Schweregrad, 0–10. Eine Zeile je Quelle.
Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen⚠ Quellen uneinig · medium–critical · 6.5–9.8
schwächen
Die CWE-Schwächeklassen, zu denen dies gehört.
betroffene Produkte (4)
Betroffene Produkte und Versionsbereiche.
Advisories (8)
Hersteller- und Ökosystem-Meldungen dazu.
- GHSA-2xpg-3hx4-fm9rOut of bounds read in xcb2021-08-25ghsa · osvUS
An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because there is an out-of-bounds read in xcb::xproto::change_property(), as demonstrated by a format=32 T=u8 situation where out-of-bounds bytes are sent to an X server.
- GHSA-3288-cwgw-ch86Unchecked Return Value in xcb2021-08-25ghsa · osvUS
An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because xcb::xproto::GetAtomNameReply::name() calls std::str::from_utf8_unchecked() on unvalidated bytes from an X server.
- GHSA-3cj3-jrrp-9rxfUnchecked Return Value in xcb2021-08-25ghsa · osvUS
An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because transmutation to the wrong type can happen after xcb::base::cast_event uses std::mem::transmute to return a reference to an arbitrary type.
- GHSA-mp6r-fgw2-rxfxArbitrary return types in xcb2021-08-25ghsa · osvUS
The function xcb::xproto::GetPropertyReply::value() returns a slice of type T where T is an unconstrained type parameter. The raw bytes received from the X11 server are interpreted as the requested type. The users of the xcb crate are advised to only call this function with the intended types. These are u8, u16, and u32. This issue is tracked here: https://github.com/rust-x-bindings/rust-xcb/issues/95
- CVE-2021-269552021-02-09vendor · osvUS
An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because xcb::xproto::GetAtomNameReply::name() calls std::str::from_utf8_unchecked() on unvalidated bytes from an X server.
- CVE-2021-269562021-02-09vendor · osvUS
An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because bytes from an X server can be interpreted as any data type returned by xcb::xproto::GetPropertyReply::value.
- CVE-2021-269572021-02-09vendor · osvUS
An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because there is an out-of-bounds read in xcb::xproto::change_property(), as demonstrated by a format=32 T=u8 situation where out-of-bounds bytes are sent to an X server.
- RUSTSEC-2021-0019Multiple soundness issues2021-02-04vendor · osvUS
## Calls `std::str::from_utf8_unchecked()` without any checks The function `xcb::xproto::GetAtomNameReply::name()` calls `std::str::from_utf8_unchecked()` on the raw bytes that were received from the X11 server without any validity checks. The X11 server only prevents interior null bytes, but otherwise allows any X11 client to create an atom for arbitrary bytes. This issue is tracked here: https://github.com/rust-x-bindings/rust-xcb/issues/96 ## `xcb::xproto::GetPropertyReply::value()` allows arbitrary return types The function `xcb::xproto::GetPropertyReply::value()` returns a slice of type `T` where `T` is an unconstrained type parameter. The raw bytes received from the X11 server are interpreted as the requested type. The users of the `xcb` crate are advised to only call this function with the intended types. These are `u8`, `u16`, and `u32`. This issue is tracked here: https://github.com/rust-x-bindings/rust-xcb/issues/95 ## Out of bounds read in `xcb::xproto::change_property()` `xcb::xproto::change_property` has (among others) the arguments `format: u8` and `data: &[T]`. The intended use is one of the following cases: - `format = 8` and `T = u8` - `format = 16` and `T = u16` - `format = 32` and `T = u32` However, this constraint is not enforced. For example, it is possible to call the function with `format = 32` and `T = u8`. In this case, a read beyond the end of the `data` slice is performed and the bytes are sent to the X11 server. The users of the `xcb` crate are advised to only call this function with one of the intended argument combinations. This issue is tracked here: https://github.com/rust-x-bindings/rust-xcb/issues/94 ## 'Safe' wrapper around `std::mem::transmute()` The function `xcb::base::cast_event()` takes a reference to a `xcb::base::GenericEvent` and returns a reference to an arbitrary type, as requested by the caller (or found via type interference). The function is implemented as a direct call to `std::mem::transmute()`. Since the return type is not constrained, this allows transmution to an incorrect type or a type that is larger than the X11 event that was passed in. X11 events are mostly always 32 bytes large and this function works as intended. Users are advised to only cast to the event structs provided by the `xcb` crate (and hope for the best). This issue is tracked here: https://github.com/rust-x-bindings/rust-xcb/issues/78
auch bekannt als (8)
Weitere Namen und Kennungen dieser Entität.
quellen
Welche Quellen diesen Datensatz belegen und wann.
Referenzen (3)
Externe Belege — Patches, Meldungen, Analysen.
Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.
Kostenloser Scan