-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack corruption due to ECP_mul temporary #43
Comments
Replacing iterator validatorKeys*(conf: BeaconNodeConf): ValidatorPrivKey =
for validatorKeyFile in conf.validators:
try:
yield validatorKeyFile.load
except CatchableError as err:
warn "Failed to load validator private key",
file = validatorKeyFile.string, err = err.msg
for kind, file in walkDir(conf.localValidatorsDir):
if kind in {pcFile, pcLinkToFile} and
cmpIgnoreCase(".privkey", splitFile(file).ext) == 0:
try:
yield ValidatorPrivKey.init(readFile(file).string)
except CatchableError as err:
warn "Failed to load a validator private key", file, err = err.msg by iterator validatorKeys*(conf: BeaconNodeConf): ValidatorPrivKey =
for validatorKeyFile in conf.validators:
try:
yield validatorKeyFile.load
except CatchableError as err:
warn "Failed to load validator private key",
file = validatorKeyFile.string, err = err.msg
for kind, file in walkDir(conf.localValidatorsDir):
if kind in {pcFile, pcLinkToFile} and
cmpIgnoreCase(".privkey", splitFile(file).ext) == 0:
try:
let privkey = ValidatorPrivKey.init(readFile(file).string)
debugEcho "iter: ", cast[array[7, uint64]](privkey)
except CatchableError as err:
warn "Failed to load a validator private key", file, err = err.msg solves the issue |
This was referenced Mar 12, 2020
Existing data was properly overwritten if the input bytes/string was lengthy enough. This is fixed in #44, calling |
mratsim
added a commit
to status-im/nimbus-eth2
that referenced
this issue
Mar 12, 2020
tersec
pushed a commit
to status-im/nimbus-eth2
that referenced
this issue
Mar 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A followup on #40 and another debugging session on status-im/nimbus-eth2#780
By instrumenting privToPub and ECP_MUL with
We get the following stacktrace after building beacon_node with
Trying to isolate this with the following test cases gives different result
Notice that the temporary variable
t
first bits are not polluted.The text was updated successfully, but these errors were encountered: