RUSTSEC-2020-0098

UsbContext trait did not require implementers to be Send and Sync.

Issued
Package
rusb (crates.io)
Type
Unsound
Categories
  • memory-corruption
  • thread-safety
Aliases
Details
https://github.com/a1ien/rusb/issues/44
Patched
  • >=0.7.0
Keywords
  • concurrency

Description

Affected versions of rusb did not require UsbContext to implement Send and Sync. However, through Device and DeviceHandle it is possible to use UsbContexts across threads.

This issue allows non-thread safe UsbContext types to be used concurrently leading to data races and memory corruption.

The issue was fixed by adding Send and Sync bounds to UsbContext.

More