launchdarkly / rust-server-sdk

LaunchDarkly Server-Side SDK for Rust
https://docs.launchdarkly.com/sdk/server-side/rust
Other
18 stars 13 forks source link

Update package versions #19

Closed ranandfigma closed 1 year ago

ranandfigma commented 1 year ago

A number of packages are on very old versions that contain unmaintained/ deprecated dependencies that have known vulnerabilities. Here is a list of the couple that were picked up by cargo-deny:

error[A001]: Data race when sending and receiving after closing a `oneshot` channel
    ┌─ /home/runner/work/figma/figma/Cargo.lock:491:1
    │
491 │ tokio 0.1.22 registry+https://github.com/rust-lang/crates.io-index
    │ ------------------------------------------------------------------ security vulnerability detected
    │
    = ID: RUSTSEC-2021-0124
    = Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0124
    = If a `tokio::sync::oneshot` channel is closed (via the
      [`oneshot::Receiver::close`] method), a data race may occur if the
      `oneshot::Sender::send` method is called while the corresponding
      `oneshot::Receiver` is `await`ed or calling `try_recv`.

      When these methods are called concurrently on a closed channel, the two halves
      of the channel can concurrently access a shared memory location, resulting in a
      data race. This has been observed to [cause memory corruption][corruption].

      Note that the race only occurs when **both** halves of the channel are used
      after the `Receiver` half has called `close`. Code where `close` is not used, or where the
      `Receiver` is not `await`ed and `try_recv` is not called after calling `close`,
      is not affected.

      See [tokio#4225][issue] for more details.

      [corruption]: https://github.com/tokio-rs/tokio/issues/4225#issuecomment-9[67](https://github.com/figma/figma/actions/runs/3576570124/jobs/6014538659#step:5:68)434847
      [issue]: https://github.com/tokio-rs/tokio/issues/4225
      [`oneshot::Receiver::close`]: https://docs.rs/tokio/1.14.0/tokio/sync/oneshot/struct.Receiver.html#method.close
    = Announcement: https://github.com/tokio-rs/tokio/issues/4225
    = Solution: Upgrade to >=1.8.4, <1.9.0 OR >=1.13.1
cwaldren-ld commented 1 year ago

Thank you for the report @ranandfigma. We are working on a release that will contain upgrades to many of our dependencies.

Filed internally as 178110.

cwaldren-ld commented 1 year ago

Hi @ranandfigma , the latest 1.0 release has updated dependencies.

Specifically, reqwest has been entirely removed. Feel free to file a new issue if you encounter any more problems.