Skip to content

multi: Clear private data asap.#1584

Merged
chappjc merged 1 commit intodecred:masterfrom
JoeGruffins:clearprivdata
Apr 21, 2022
Merged

multi: Clear private data asap.#1584
chappjc merged 1 commit intodecred:masterfrom
JoeGruffins:clearprivdata

Conversation

@JoeGruffins
Copy link
Copy Markdown
Member

In core methods and consumers, clear passwords, private keys, and seeds
when possible to protect against some memory scraping attacks.

lightly discussed in #1582

This pr makes it so the crypter cannot be used in goroutines. I think we're not doing so atm, but should be careful going forward.

Comment thread client/webserver/api.go Outdated
Comment thread client/rpcserver/handlers.go Outdated
Comment thread client/rpcserver/handlers.go
Copy link
Copy Markdown
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I'm pretty sure we don't need the new encrypt.Zero given encode.ClearBytes.
I would not be opposed to dex/encrypt/encrypt.go defining type Zero = encode.ClearBytes to smooth some stuff out, but if a package is already importing dex/encode, there's really no need to use encrypt.

Comment thread client/rpcserver/handlers.go
Comment thread client/rpcserver/handlers.go Outdated
Comment thread client/webserver/api.go Outdated
Comment thread client/webserver/api.go Outdated
Comment thread client/webserver/api.go Outdated
Comment thread client/webserver/api.go Outdated
Comment thread client/rpcserver/handlers.go Outdated
@JoeGruffins
Copy link
Copy Markdown
Member Author

Just rebased.

In core methods and consumers, clear passwords, private keys, and seeds
when possible to protect against some memory scraping attacks.
@JoeGruffins
Copy link
Copy Markdown
Member Author

JoeGruffins commented Apr 20, 2022

@chappjc chappjc merged commit d54a347 into decred:master Apr 21, 2022
@chappjc chappjc added this to the 0.5 milestone Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants