nuts-foundation / nuts-foundation/nuts-node
NTS-002: Sensitive Data Is Not mlocked
@reinkrul is already working on this.
Since Dec 8, 2022.
- Dominant language
- Go
- Stars
- 28
- Forks
- 23
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 76
Description
Description
Secret keys might be written to disk and escape sanitization when memory is swapped out.
Technical description:
It might be possible for a local attacker to exhaust memory while sensitive key-material is in use in RAM. Since keys are not protected with mlock() , these keys might be swapped out to disk and thus may leak. Unfortunately these keys written to disk will not be sanitized on disk when they are wiped after usage.
Impact:
Private keys may be swapped to disk and exfiltrated by an attacker-controlled process on the same machine.
Recommendation:
Our recommendation is to use mlock() on any sensitive key-material prohibiting these to be written to disk, or alternatively consider a generic solution like https://github.com/awnumar/memguard .
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.