Detailed explanation of Parity contract vulnerability, why a novice developer caused a disaster

Detailed explanation of Parity contract vulnerability, why a novice developer caused a disaster

A critical security vulnerability in Ethereum’s Parity multi-signature wallet was triggered on November 6, which paralyzed all Parity multi-signature wallets created after July 20.

As you may have seen, Parity published a security advisory today informing its users and developers of the “accidentally” triggered vulnerability, which, according to statistics, resulted in the freezing of more than $150 million worth of Ether, including $90 million of funds belonging to the new project “Polkadot” by Gavin Woods, the founder of Parity and former core developer of Ethereum.

Contract Ether
0x1c0e9b714da970e6466ba8e6980c55e7636835a6 1,000.00
0x227b7656129bc07eef947d3c019a7a8f36a24e74 655.00
0xa8871d303c501c39deb2abe118691eeeea813e30 450.00
0xc7cd9d874f93f2409f39a95987b3e3c738313925 16,475.53
0x3bfc20f0b9afcace800d73d2191166ff16540258 306,276.27
0xd7dfc49e5d13f77830029134fb06f5fa6d5e8ec4 1,173.40
0xe705daf2f65228aade8c8ac4f60a586b1391228d 340.40
0x43ab622752d766d694c005acfb78b1fc60f35b69 21,704.33
0x71331c46fba44d85e293d63d1d5a8cdadf264451 409.67
0x0397453bb7db560a039d474c5693578fdb6096c4 600.00
0x39d46c1824dfc32ad4e80c28a825296a8ac52437 397.00
0x94bd4150e41c717b7e7564484693073239715376 671.69
0x22ef5434cc2deb6c760c7ebbc88777d1f32757f6 397.00
0x7693f7100a671d0cbfca63bd766fd698c17d6f04 779.09
0x376c3e5547c68bc26240d8dcc6729fff665a4448 114,939
0x35bd14e205251f3ee0405bc543ceac1d776e5736 400.00
0x47c663ba238fb5c66fa7ac92c33a86a41da261de 594.00
0xd341f357138dc3d1488e203a0138de71f4e0de63 1,376.33
0x0da3cb3046f72fcbb49edf01b04ab6efc6c0d8dc 2,520.77
0x4d8006dc86d6015d5cb1f33c4e98ca12c39fcba2 360.00
0x8655d6bf4abd2aa47a7a4ac19807b26b7609b61d 3,000.00
0xa08c1134cdd73ad41889f7f914ecc4d3b30c1333 325.50
0x41849f3bd33ced4a21c73fddd4a595e22a3c2251 3,237.04
0xa14703b1da572e3ddf4803113eb32159209199db 600.00
0xbe17d91c518f1743aa0556425421d59de0372766 4,360.67
0x28ff414bb944b81053389f22113ad305c8ac69fa 332.00
0xdb46b29957b3021a5ea79c49f443083aba994a33 500.00
0x3fcb02a27dc60573a0cb9bff9528fcd77e78d734 1,568.31
0x49eafa4c392819c009eccdc8d851b4e3c2dda7d0 4,524.98
0x10e301560860db30dc1bc519a99aa860bc71f076 365.00
0x37c6772be3e333e8acbc38521fb5090b0abe1a3b 350.00
0x7100c7ce94607ef68983f133cfd59cc1833a115d 327.54
0x0881538f81a4092bf5a00462c1853a5f2a8b6fa5 353.00
0x05cf82965cc412494c5de53bf107ec631accf03e 399.00
0xf6e51ae30705cd7248d4d9ac602cb58cc4b61a52 1,400.00
0xd95a6aa3e20397211e487b231211e16790a21ac9 150.48
0x7b6bce3cf38ee602030662fa24ac2ed5a32d0a02 144.85
0x2f9f02f2ba99ff5c750f95cf27d25352f71cd6a9 320.00
0xd31a34d621122bebe0dee360e33bbe61193d5b90 1,416.10
0x05b34bf3562c61715f70240104abc6ae8c80055c 1,577.31
0x428c131b323161f549bf61da2a434d1a3a920b0b 500.00
0xcf46cc20deba6b802707961ca3c6f3602566c2cf 350.03
0xe4aa399ac8c2c636c3f084f8176c01c5c73ed90e 350.00
0x6492780dc59598c6f8a4984c6deffd4600ba0003 1,747
0x4ebcf8a133cce749ee07d4c764e10d1916f84f5c 342.82
0x728dbf45456de6b51b1227d5cd5e2507167688c0 350.00
0xef5da7752c084df1cc719c64bbe06fa98b2c554c 345.50
0x53ea709e81eefa48a311b2a582ad8057d45d4acc 350.00
0x0f30c808069315b3b7dfbfe149c87448b50c6d8b 285.74
0x7e5b6dd9ba1abf42bfb41e5ae8f46fe5e01aae14 285.00
0x66ea39aee3f4a2e39d2f28b397a4daf0bffafd89 22.72
0xdb0e7d784d6a7ca2cbda6ce26ac3b1bd348c06f8 6,925
0xc1bd4f07421571364617adce98a8d657f52498b7 108.47
0xa9eebb32a1d459eb1eb5078c543427c34da44313 57.89
0x2006df02a034359fd32e5bb7d64e07aca44b573a 10.41
0x8f7070b6b8e8ac245cc8735c32cccc12e178a99e 7.52
0x009f3de1e8878cda9c2e94a6ce6084d9ca86425c 10.41
0x570f77473c329a5149fe5d5786d8759e38ed15be 15.00
0xbd13904c10be5fb680e1f6f950bbd4a317d7098c 10.59
0x7c922218294246fc1e8c99c737f87afd94361f4f 6.66
0xe0b93a625693a33221cf9bd534ae790ea59a9ba7 5.68
0xdcab43b6ef9dd156c54e1c4f055aa60e317c6f99 10.07
0x394d8b3c5de759b8258376fde9b394c8f237d8c4 80.58
0xc1bef33095fc3ff1bfa38a193a028fd670751462 5.20
0x1b3de683a4ff93457b0a27986361a5090e3fbb50 6.96
0x21675f1b593ac15c5585bca5e7778e4f391620bd 2.91083644
0x37764fe50340f0158b9facefb3dbaf5222e34a3d 5.50
0x4073404129aea005a661f09c38bc64908b27a746 5.00
0x2f56c5f0b2548ce52fac5512b76eadbb2c511a7f 4.35
0x19986fcfbc5ef9b9e377fa8429c5a8d215cbe814 2000
0x4de05b00797b11ae43e08ad0068fbd0689a0e041 768.8
0x5f3ce3907e7e4c5b5b8d04dd3211ca8b81a64733 741.4272475
0x6e314220258a6fa41c2d50cd98f123ffff247d9e 501
0x043dae09e7f51d02b8745bcf82c4c5ee86e4bc96 360.00
0xc32050abac7dbfef4fc8dc7b96d9617394cb4e1b 340.23
0xe9d7d845388311e478be278bc2b48afed5bdadde 2.00
0xdd0c464c5ef163badeb6d3f4d71ed956771d599f 1.02
0xdd21d75db9ed2fe97775ffa46e8fa1c8072cd15d 1
0xdc7f356bfa601aeaa96d79efad3e0eb505169572 1
0xc94be6acc592957291d787e802b0c932a76d671a 0.999997094
0x4585b138dc13925c65613a511fc1fc642d16d976 0.9997583302
0x5483c2e726061fa518379820d863076aff39f7ea 0.8
0x5ccba1eab776fc4d7cc89084c1825f5ffd87ffda 0.793952825
0xc3501dad78f27c7147b65701c5da2d1d2a71285e 0.495
0x08ca68ecc2cc98f8ba6345531089899fc4c42f57 0.4687
0x4405cdf409d270fa55f9a4020c3b5772bf1a1a10 0.2990756894
0x62c00230b47cc17d6c9a871352568b3f4ffc5f1a 0.2
0x1947c2a678b7cbac00a75d6490ca7d6f8a4b0eda 0.2
0xce8e7257b640cf9eef096b188e1345e96c4a80d9 0.184728438
0x42a3d814e6e3c25d20120b972e4d174ef76d93d2 0.141
0x3646da9d8e6cb67b0cf86af2c30c8b615d9bb9ce 0.133737051
0xefa1994328e59f8e24d85458810d67a27289679a 0.115
0x829778a21eabc3e4c6835689eea6eeb0857d1e03 0.1
0x09d9b2f572f4c7c99631349f2dbad34273aea997 0.1
0xa9139277a57a86dbe1ab916e111b982f12ed7fdf 0.1
0x9d8d4ff2b1dfb9a14e50e7d84952b6f14fcb8377 0.08305596935
0xa386560ac173a436c0c592272bb419c94cca8bc9 0.08
0x830389b854770e9102eb957379c6b70da4283d60 0.05
0xef0613ab211cfb5eeb5a160b65303d6e927f3f85 0.05
0x5311fce951684e46cefd804704a06c5133030dff 0.05
0xe01c0bdc8f2a8a6220a4bed665ceeb1d2c716bcb 0.05
0xf6c68965cdc903164284b482ef5dfdb640d9e0de 0.05
0xe64bae6b0e8b89a1a3f8152dc3fb5e3910166689 0.05
0xe3a482efacc86b55cd60fa1ae07b658548e00c2e 0.049693242
0x0285d5528f574f1361009eef75a4f61942767799 0.044433042
0xd32db75141f77a1174ba3130f69f0aa002cb1ccc 0.04
0xa57b2cf597996a92c9967bd0f3e9d22f565b3a62 0.039
0x42ac09396496d2484114625078ed29205ba01244 0.03
0xabfe9ee7512e2291b95666f5f0e9de1b43659e56 0.03
0x2f8d38c727ebac1daf6b42e15cdbe73cad0e2211 0.02548275862
0x8b3cb840c24ecd4f045f5cfb8ea14beec17b51e0 0.024
0xc01283f05079d6a143c12079cecac8e3f966694c 0.023
0xfd2b3eb22bac1634f8b554a6d67fd11849dc3a0f 0.02187378
0xdf665ab68393bd31cf244171ba57abdbe871f81d 0.02
0x32a528762b6326ca0e2b314530d412f823a23d51 0.02
0x25f602eb3497cfc37d70436513fca6df45a84181 0.019345831
0x8cfab485f4de196cc65073dc8d1196c7b6449940 0.019
0x199a4567ddbfa4426903e36b4752213ba1f34d64 0.01760873
0xd5ca44255601a3fa439dfeb715d4f3515548368f 0.015
0x1afb16d06e76e39732728e186e519d99a156ef4e 0.013
0x69bb3d4d29249814845c8634a03ba3aa4165c933 0.012
0xb4210e53e5b13cbfa29f72e4764f4c4b9a6ae72a 0.01008999993
0x4623913527a5511822e11490a91dade706f9d854 0.010003182
0x28877c4cc1a482378daf961937660e8d4ffeefa1 0.01
0x94535a9cee64a0258af01c8cc41cfaf7bfb58f76 0.01
0x18b4092dee9ed759b0742608be8ad904957c3d08 0.01
0xb696bee07c81b57ef2832353a7e8b26f4c80cc65 0.01
0xcf27f7edddb7af3744a545c0f8fc5b27bc652fcc 0.01
0xd7b349624208a406627010b7d440dd2f25ddd63a 0.01
0x8266bcb06a66efe3150a6f3ddd4f43caeb566245 0.01
0x6924d3ad691e7f641ffe1c95aa6297e4c10e5e86 0.01
0x769512eed08245828c705a186a09709d0afb52e1 0.01
0x87f5b0d8f79182830248382a0b6aa2c86757f51c 0.01
0x8c53795efc5dca289a703ecb40f95934b1a92362 0.009246044699
0xac3c64644d3ca6f960308ed7cd79bfa794bf12b1 0.007
0xd51f04d699a929c86695d0ef00973189dc928429 0.006
0xb69e024300f63c452ba0572405d53ca5e991dd77 0.005
0xc1d787c7a1a98b187c31362b588447e5a945fcbb 0.005
0xd78331e9dd5b7dc506da403d37a43b1335fbdd11 0.005
0xcfe56f64824c75dcfc2d9860cca088f287d4768b 0.003720439749
0x7614ba4b95cc4f456cae349b94b8a6992d4818ea 0.003
0xad0d6a9c97d6d401a7e4444859f41f0606d07b62 0.0026
0x97695b2bb33736b7517303ac4be0863a4f0d7fe9 0.002
0x493f7decbf1e3da9765c4db06abb8c4daf4a7893 0.001
0x142c10c90aa0a4dd588edf1ac54c3e959646cc2d 0.001
0x5ab18d3b796bae844e243d0bc906b0209106c10a 0.0005
0x20db5d16771a4ebbb83a00cc27b784407a3bae97 0.0005
0x8d358fdc7e1ed7e69f7fb6d5daccc77282a2d737 0.0004
0x39c92cae22c0648cd9382717b0b5ac944c81af14 0.00022839
0x0d6c24d85680a89152012f9dc81e406183489c1f 0.00019
0x5cef6ef48e2ee1c1c9aecf36a669d8a4eb6609da 0.000039389
Ether Total
513,701.99

(Loss Statistics)

How long has this vulnerability been around?

As Dan Guido pointed out, this new vulnerable contract has been deployed for more than 100 days since July 20, one day after the original multi-wallet vulnerability was fixed.

Vulnerabilities

A novice developer with the username " devops199 " claimed that he accidentally triggered the vulnerability and reported it through GitHub.

The newly deployed contract 0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4 contains a vulnerability, and its owner is not initialized. As a library, it is possible that "devops199" can transform it into a regular multi-signature wallet, because for Ethereum, there is no substantial difference between accounts, libraries, and contracts.

The incident occurred due to two transactions. The first one took over the library, and the second one killed the library. All multi-signature wallets created after July 20 used this library.

Transaction #1

In the above transaction, the user initialized the owner of the Parity library (0xae7168deb525862f4fee37d987a971b385b96952) using the initWallet() function. Assigning the owner directly to the library allows the user to convert the library into a regular multi-signature wallet.

 // throw unless the contract is not yet initialized.
modifier only_uninitialized { if (m_numOwners > 0) throw; _; }
// constructor - just pass on the owner array to the multiowned and
// the limit to daylimit
function initWallet(address[] _owners, uint _required, uint _daylimit) only_uninitialized {
initDaylimit(_daylimit);
initMultiowned(_owners, _required);
}

Transaction #2

After initially becoming the owner of the library (which has now become a regular multi-sig wallet), this user can call the kill() command, which will cause all wallets that depend on the third-party library to crash. This affects all party wallets created after July 20th, as users can no longer use the library.

 // kills the contract sending everything to `_to`.
function kill(address _to) onlymanyowners(sha3(msg.data)) external {
suicide(_to);
}

in conclusion

Although the vulnerable smart contract was open sourced and deployed several months ago, the vulnerability still managed to escape the scrutiny of the Parity team.

Due to the design of smart contracts, they cannot be easily repaired, which means that once a mistake occurs in the contract, all wallets that rely on this third-party library will suffer.

In fact, the open source nature of libraries is also questionable, and it would be terrible if our daily operating systems did the same.

We have seen a lot of enthusiasm for blockchain smart contracts, and the average user believes that these smart contracts are secure. But just like any other software, smart contracts are vulnerable.

All of the recent security issues surrounding smart contracts have created increasing challenges for storing funds on a blockchain-based software layer.

<<:  Ethereum Parity wallet has another major bug, and the multi-signature vulnerability may have caused hundreds of millions of dollars in funds to be frozen

>>:  Japan continues to expand its mining business, and this city is recruiting cryptocurrency miners

Recommend

Detailed explanation of bone fortune-telling table for men

Fortune telling by weighing bones, abbreviated as...

Save big money easily

Some people can save a lot of money easily. So wh...

A man's face can tell whether you will have a boy or a girl

A man's face can tell whether you will have a...

Analysis of uneven front teeth, let’s learn about it together

Everyone has teeth, and the shape of each person&...

The face of not eating when in a bad mood

Many times, some people do everything based on th...

Bitcoin is “stable” at $30,000. Is the bull market signal coming?

Since 2023, the Bitcoin market has maintained a s...

Which face has strong peach blossom luck?

In traditional Chinese physiognomy, facial featur...

The fate of a woman with a mole on her forehead

According to numerology, a person’s overall fortu...

ETH 2.0 is here. Can I still buy mining machines to mine ETH?

Hello everyone, I am Keven, the product manager o...