This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate gfx-backend-vulkan

Dependencies

(15 total, 8 outdated, 2 possibly insecure)

CrateRequiredLatestStatus
 ash^0.29.00.38.0+1.3.281out of date
 byteorder^11.5.0up to date
 core-graphics^0.170.24.0out of date
 derivative^1.02.2.0out of date
 gfx-hal^0.3.10.9.0out of date
 lazy_static^11.5.0up to date
 log^0.40.4.22up to date
 objc^0.2.50.2.7up to date
 raw-window-handle^0.10.6.2out of date
 shared_library^0.1.90.1.9up to date
 smallvec ⚠️^0.61.13.2out of date
 winapi^0.30.3.9up to date
 winit^0.190.30.5out of date
 x11^2.152.21.0up to date
 xcb ⚠️^0.81.5.0out of date

Security Vulnerabilities

smallvec: Buffer overflow in SmallVec::insert_many

RUSTSEC-2021-0003

A bug in the SmallVec::insert_many method caused it to allocate a buffer that was smaller than needed. It then wrote past the end of the buffer, causing a buffer overflow and memory corruption on the heap.

This bug was only triggered if the iterator passed to insert_many yielded more items than the lower bound returned from its size_hint method.

The flaw was corrected in smallvec 0.6.14 and 1.6.1, by ensuring that additional space is always reserved for each item inserted. The fix also simplified the implementation of insert_many to use less unsafe code, so it is easier to verify its correctness.

Thank you to Yechan Bae (@Qwaz) and the Rust group at Georgia Tech’s SSLab for finding and reporting this bug.

xcb: Multiple soundness issues

RUSTSEC-2021-0019

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