Closed pruneau628 closed 2 months ago
We did some test on a recently installed indy / ubuntu 20.04 system. This was more a downgrade scenario, since the upgraded package was in the base image. The indy system was thus started from scratch, with no transaction but the genesis one. First good news: with all 4 nodes running with the upgraded package, the cluster started without problem. Then, the python3-sha3 was downgraded to the vulnerable version on one of the node, and this node reintegrated the cluster with no consesus problem. This is good news, but we want to do a bit more tests with non-empty ledgers.
Thanks to @lynnbendixsen lending his test system, I did run a few test cases, and consider that we should be safe upgrading the 22.04-based ubuntu indy systems.
Vulnerable system have the 1.0.2-4
python3-sha3
installed, while the non-vulnerable ones are updated to at least version 1.0.2-4ubuntu0.1
.
To run the following tests I provisionned a 100K domain nym transactions, to make sure that catch-up would happen, and also kept adding new NYMs while doing the various test cases:
I'm happy to announce that the 4-nodes indy cluster recovered in all the situations I put it through. So @lynnbendixsen and @WadeBarnes, unless someone comes up with more pertinent test case, I recommend that all the indy nodes running ubuntu 20.04 be upgraded to the latest release. Here is a (pseudo) script:
apt-mark unhold python3-sha3
apt update && apt upgrade -y
apt-mark hold python3-sha3
systemctl restart indy-node
Thanks @pruneau628 and @lynnbendixsen
Yes, thanks @pruneau628 and @lynnbendixsen. I verified on a test cluster as well, the only change I made to the script was to run apt install python3-sha3
instead to only update the python3-sha3
package and avoid upgrading other Ubuntu packages outside of our patch/update cycle.
@pruneau628 I've addressed this through #1679. Are you ok if we close this issue?
This problem was flagged by Quebec MCN security team.
OS release:
Indy release:
Given the code loading the sha3_256 function in [utils.py](https://github.com/hyperledger/indy-plenum/blob/698b9500ad3a7a15993af72a1c35a406c5673262/state/util/utils.py], line 5-12, we tried this, to check which underlying OS library was used:
The last part of those traces clearly show that the underlying c objects are coming from
'/usr/lib/python3/dist-packages/_pysha3.cpython-38-x86_64-linux-gnu.so
And this shows that this was installed through an official ubuntu package:
Knowing this, and that the fix is available in ubuntu https://changelogs.ubuntu.com/changelogs/pool/universe/p/pysha3/pysha3_1.0.2-4ubuntu0.1/changelog
We are planning to test this procedure on an ubuntu node:
Then for starters, see if the upgraded node manage to reach consensus once restarted.
We will inform this issue of the developments, but any advice on better regression tests methods are welcome.