Closed HCastano closed 3 years ago
Hey, the currently latest release of wasmtime - 0.28.0 has this issue fixed. They actually moved out from using raw-cpuid to use a standard library macro for things they needed raw-cpuid for, in https://github.com/bytecodealliance/wasmtime/pull/2607.
Please update Substrate to the latest wasmtime if possible.
It is also worth to mention that there is another vulnerability that the wasmtime 0.28.0 fixes: https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-hpqh-2wqx-7qp5 (or CVE-2021-32629). I am not sure if this bug affects Substrate as it is in a Cranelift x64 backend, but still.
We're on wasmtime
0.27.0
which, while not the latest, does indeed have the fix for the original raw-cpuid
issue.
As for your second comment, the security notice mentions cranelift-codegen
versions <= 0.73.0
are affected. Looking at Substrate's lockfile we're using cranelift-codegen
0.74.0
, so there's no immediate need for us to bump wasmtime
.
@HCastano
Looking at Substrate's lockfile we're using cranelift-codegen 0.74.0, so there's no immediate need for us to bump wasmtime.
That is correct. However, this is true for the master
branch:
But not for the latest release (3.0.0): https://github.com/paritytech/substrate/blob/v3.0.0/Cargo.lock#L923-L941
To sum up, the issue is that there were no releases after 3.0.0 (10th February 2021) which contain those dependencies updates.
With this in mind, can this issue issue be reopened and then closed when there is a release including a fix for it, please?
@disconnect3d I don't think there's anyone using Substrate in production that's running on the v3.0.0
release. Any major project using Substrate (e.g Polkadot) will be on master
, or something close to it, in which case this isn't a concern.
It's also unclear when a new formal Substrate release will drop, so we may end up with a solved issue sitting around for ages.
@disconnect3d I don't think there's anyone using Substrate in production that's running on the v3.0.0 release.
In case the 2.x version is still supported (I don't know), it also does not have this fixed.
Any major project using Substrate (e.g Polkadot) will be on master, or something close to it, in which case this isn't a concern.
Does it mean that master is a stable version that can be relied upon? Is this documented anywhere?
From my experience, many projects stay on whatever they got with substrate-node-template or any other example or tutorial they followed, don't update and have vulnerable dependency issues. Now, the node template is based on Substrate's monthly-2021-08 tag which has it already fixed, but still.
In case the 2.x version is still supported (I don't know), it also does not have this fixed.
The 2.x version is definitely not supported anymore.
Does it mean that master is a stable version that can be relied upon? Is this documented anywhere?
I wouldn't call it stable per say, but it is reasonably reliable. Not sure if this is formally documented anywhere, but as soon as you try and integrate with other parts of the ecosystem (e.g, Polkadot, Cumulus) you'll see that you need to be running a pretty up-to-date version of Substrate.
From my experience, many projects stay on whatever they got with substrate-node-template or any other example or tutorial they followed, don't update and have vulnerable dependency issues.
If we look at production ready projects though, they're typically following more aggressive releases than the monthly tags which are available for the node template. For example, Acala and Moonbeam are using the Substrate version used by Polkadot v0.9.8
.
The
sc-executor-wasmtime
crate is usingwasmtime
v0.19.0
. This in turn is using a vulnerable version ofraw-cpuid
(v7.0.3
). While thewasmtime
master branch has bumpedraw-cpuid
to the recommendedv9.0.0
release, they haven't published a new version. When it's available we should update.Here's the output from
cargo-deny
in case you're curious: