Open github-actions[bot] opened 2 years ago
We use two different versions of tokio: 0.1.22
and 1.12.0
. I opened #2119 to update from 1.12.0
to the latest version, but any packages that still use version 0.1.22
will remain affected by this issue:
$ cargo tree --no-dedupe --workspace -i tokio:0.1.22
tokio v0.1.22
βββ async-jsonrpc-client v0.1.0 (https://github.com/witnet/async-jsonrpc-client?branch=fix-tcp-leak#600a2d69)
β βββ witnet-centralized-ethereum-bridge v0.1.0 (/witnet-rust/bridges/centralized-ethereum)
β βββ witnet-ethereum-bridge v0.1.0 (/witnet-rust/bridges/ethereum)
β βββ witnet_net v0.1.0 (/witnet-rust/net)
β β βββ witnet-centralized-ethereum-bridge v0.1.0 (/witnet-rust/bridges/centralized-ethereum)
β β βββ witnet_wallet v0.3.2 (/witnet-rust/wallet)
β β βββ witnet v1.4.2 (/witnet-rust)
β βββ witnet_wallet v0.3.2 (/witnet-rust/wallet)
β βββ witnet v1.4.2 (/witnet-rust)
βββ hyper v0.12.36
β βββ hyper-tls v0.3.2
β β βββ web3 v0.10.0
β β βββ witnet-ethereum-bridge v0.1.0 (/witnet-rust/bridges/ethereum)
β βββ web3 v0.10.0
β βββ witnet-ethereum-bridge v0.1.0 (/witnet-rust/bridges/ethereum)
βββ jsonrpc-server-utils v15.1.0
β βββ jsonrpc-ws-server v15.1.0
β βββ witnet_net v0.1.0 (/witnet-rust/net)
β βββ witnet-centralized-ethereum-bridge v0.1.0 (/witnet-rust/bridges/centralized-ethereum)
β βββ witnet_wallet v0.3.2 (/witnet-rust/wallet)
β βββ witnet v1.4.2 (/witnet-rust)
βββ tokio-core v0.1.17
β βββ tokio-uds v0.1.7
β β βββ web3 v0.10.0
β β βββ witnet-ethereum-bridge v0.1.0 (/witnet-rust/bridges/ethereum)
β βββ web3 v0.10.0
β β βββ witnet-ethereum-bridge v0.1.0 (/witnet-rust/bridges/ethereum)
β βββ websocket v0.21.1
β β βββ web3 v0.10.0
β β βββ witnet-ethereum-bridge v0.1.0 (/witnet-rust/bridges/ethereum)
β βββ witnet-ethereum-bridge v0.1.0 (/witnet-rust/bridges/ethereum)
βββ witnet-ethereum-bridge v0.1.0 (/witnet-rust/bridges/ethereum)
tokio
0.1.22
>=1.8.4, <1.9.0,>=1.13.1
<0.1.14
If a
tokio::sync::oneshot
channel is closed (via theoneshot::Receiver::close
method), a data race may occur if theoneshot::Sender::send
method is called while the correspondingoneshot::Receiver
isawait
ed or callingtry_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.
Note that the race only occurs when both halves of the channel are used after the
Receiver
half has calledclose
. Code whereclose
is not used, or where theReceiver
is notawait
ed andtry_recv
is not called after callingclose
, is not affected.See tokio#4225 for more details.
See advisory page for additional details.