Skip to content

Commit

Permalink
Clear buffers before exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
aido committed Oct 13, 2023
1 parent 2c9d206 commit 7577ebb
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 9 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change log

## [1.4.1] - 2023-10-13
### Added
- Clear buffers before exiting

### Changed
-

### Fixed
-

## [1.4.0] - 2023-05-14
### Added
- Added BIP39 Check for Ledger Stax
Expand All @@ -8,7 +18,7 @@
-

### Fixed
- Fixed warnings about deprecated functions during build
- Fixed warnings about deprecated functions during build

## [1.3.2] - 2023-05-08
### Added
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ all: default
APPNAME = "Seed Tool"
APPVERSION_M = 1
APPVERSION_N = 4
APPVERSION_P = 0
APPVERSION_P = 1
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

APP_LOAD_PARAMS = --appFlags 0x10 $(COMMON_LOAD_PARAMS) --curve secp256k1 --path ""
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Ledger application that provides some useful seed management utilities
<p align="center"><img src="icons/seed_tool.png" alt="Seed Tool" style="width:10%;height:10%"/></p>

[![Build app-sskr-check](https://github.com/aido/app-sskr-check/actions/workflows/ci-workflow.yml/badge.svg)](https://github.com/aido/app-sskr-check/actions/workflows/ci-workflow.yml)
[![CodeQL](https://github.com/aido/app-sskr-check/actions/workflows/codeql-workflow.yml/badge.svg)](https://github.com/aido/app-sskr-check/actions/workflows/codeql-workflow.yml)
[![Code style check](https://github.com/aido/app-sskr-check/actions/workflows/lint-workflow.yml/badge.svg)](https://github.com/aido/app-sskr-check/actions/workflows/lint-workflow.yml)
[![License](https://img.shields.io/github/license/aido/app-sskr-check)](https://github.com/aido/app-sskr-check/blob/develop/LICENSE)
# Seed Tool: A Ledger application that provides some useful seed management utilities

[![Build app-seed-tool](https://github.com/aido/app-seed-tool/actions/workflows/ci-workflow.yml/badge.svg)](https://github.com/aido/app-seed-tool/actions/workflows/ci-workflow.yml)
[![CodeQL](https://github.com/aido/app-seed-tool/actions/workflows/codeql-workflow.yml/badge.svg)](https://github.com/aido/app-seed-tool/actions/workflows/codeql-workflow.yml)
[![Code style check](https://github.com/aido/app-seed-tool/actions/workflows/lint-workflow.yml/badge.svg)](https://github.com/aido/app-seed-tool/actions/workflows/lint-workflow.yml)
[![License](https://img.shields.io/github/license/aido/app-seed-tool)](https://github.com/aido/app-seed-tool/blob/develop/LICENSE)

![nanos](https://img.shields.io/badge/nanos-working-green)
![nanox](https://img.shields.io/badge/nanox-working-green])
![nanosp](https://img.shields.io/badge/nanosp-working-green)
![stax](https://img.shields.io/badge/stax-in_progress-orange)

Use the utilities provided by this Ledger application to check a backed up seed or generate [Shamir's Secret Sharing (SSS)](https://en.wikipedia.org/wiki/Shamir%27s_secret_sharing) for a seed.

Expand Down
Binary file modified glyphs/sskr_stax_32px.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified glyphs/sskr_stax_64px.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/nano/nanos_enter_phrase.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,12 @@ void compare_recovery_phrase(void) {
}
PRINTF("Root key from device: \n%.*H\n", 64, buffer_device);

bool memcmp_ret = os_secure_memcmp(buffer, buffer_device, 64);
memzero(buffer, 64);
memzero(buffer_device, 64);

// compare both rootkey
if (os_secure_memcmp(buffer, buffer_device, 64)) {
if (memcmp_ret) {
memzero(G_bolos_ux_context.words_buffer, G_bolos_ux_context.words_buffer_length);
(G_bolos_ux_context.onboarding_type == ONBOARDING_TYPE_BIP39)
? ux_flow_init(0, ux_bip39_nomatch_flow, NULL)
Expand Down
5 changes: 4 additions & 1 deletion src/nano/nanox_enter_phrase.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,10 @@ static uint8_t compare_recovery_phrase(void) {
PRINTF("Root key from device: \n%.*H\n", 64, buffer_device);

// compare both rootkey
return os_secure_memcmp(buffer, buffer_device, 64) ? 0 : 1;
uint8_t ret = os_secure_memcmp(buffer, buffer_device, 64) ? 0 : 1;
memzero(buffer, 64);
memzero(buffer_device, 64);
return ret;
}

void screen_onboarding_restore_word_validate(void) {
Expand Down

0 comments on commit 7577ebb

Please sign in to comment.