You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OffersAccessControl.sol has a function withdrawTotalLostAndFoundBalance() with the onlyLostAndFound modifier which checks if the msg.sender is the lostAndFoundAddress: require(msg.sender == lostAndFoundAddress, "only LostAndFound is allowed to perform this operation");
However, there is a slight possibility that someone could own the private key which corresponds to 0x0 address. Then, he or she will be able to call the functions which have this modifier when the lostAndFoundAddress is not initialized.
Having said all this, address 0x0 is a perfectly valid address. It's just as possible that you'll find the private key to this address as to any other address. If someone does find the associated private key, yes, they'll be very rich, given this address's use as a burn address. (There's a small caveat: not all addresses have associated private keys, given the way addresses are generated. There's no way to know whether address 0x0 is one of these addresses.)"
Scenario
To exploit this vulnerability someone must own the private key which corresponds to 0x0 public key.
Impact
The impact is high, however, the possibility is low.
Reproduction
Fix
Add check that the address is initialized:
modifier onlyLostAndFound() {
require(msg.sender == lostAndFoundAddress && lostAndFoundAddress != address(0), "only LostAndFound is allowed to perform this operation");
_;
}
Ethereum address
0x09Cf79Bdf8F68739979C8c825C103A7538Bd4f4b
The text was updated successfully, but these errors were encountered:
This issue was addressed in Issue #12, but for further context:
The probability of someone owning the private key to 0x0 is so low that we cannot truly comprehend it. To put this in perspective:
[–]theonetruesexmachine 1 year ago
The exact number of Ethereum addresses is therefore 2160, or "1 quindecillion 461 quattuordecillion 501 tredecillion 637 duodecillion 330 undecillion 902 decillion 918 nonillion 203 octillion 684 septillion 832 sextillion 716 quintillion 283 quadrillion 19 trillion 655 billion 932 million 542 thousand 976".
It's not really in our human capacity to understand either numbers that large, or how quickly exponential functions grow (we simply have no physical reference frame for this).
Description
OffersAccessControl.sol has a function withdrawTotalLostAndFoundBalance() with the onlyLostAndFound modifier which checks if the msg.sender is the lostAndFoundAddress:
require(msg.sender == lostAndFoundAddress, "only LostAndFound is allowed to perform this operation");
However, there is a slight possibility that someone could own the private key which corresponds to 0x0 address. Then, he or she will be able to call the functions which have this modifier when the lostAndFoundAddress is not initialized.
From: https://ethereum.stackexchange.com/questions/50596/what-s-the-point-of-checking-msg-sender%E2%89%A00-are-there-cases-where-msg-sender-can
"How msg.sender can be equal to 0 ?
Having said all this, address 0x0 is a perfectly valid address. It's just as possible that you'll find the private key to this address as to any other address. If someone does find the associated private key, yes, they'll be very rich, given this address's use as a burn address. (There's a small caveat: not all addresses have associated private keys, given the way addresses are generated. There's no way to know whether address 0x0 is one of these addresses.)"
Scenario
To exploit this vulnerability someone must own the private key which corresponds to 0x0 public key.
Impact
The impact is high, however, the possibility is low.
Reproduction
Fix
Add check that the address is initialized:
Ethereum address
0x09Cf79Bdf8F68739979C8c825C103A7538Bd4f4b
The text was updated successfully, but these errors were encountered: