Skip to content

Commit

Permalink
Audit (#103)
Browse files Browse the repository at this point in the history
* fix comment

* zeroize fix

* include picohash in fuzzer

* update snapshots

* update deps

* improve code
  • Loading branch information
chcmedeiros authored Jan 3, 2025
1 parent ddcbdac commit 16b0bb7
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ if(ENABLE_FUZZING)

foreach(target ${FUZZ_TARGETS})
add_executable(fuzz-${target} ${CMAKE_CURRENT_SOURCE_DIR}/fuzz/${target}.cpp)
target_include_directories(fuzz-${target} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps/picohash)
target_link_libraries(fuzz-${target} PRIVATE app_lib rslib)
target_link_options(fuzz-${target} PRIVATE "-fsanitize=fuzzer")
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.installer_script

include $(BOLOS_SDK)/Makefile.defines

# Set the default value for PRODUCTION_BUILD to 0 if not already defined
# Set the default value for PRODUCTION_BUILD to 1 if not already defined
PRODUCTION_BUILD ?= 1

$(info ************ TARGET_NAME = [$(TARGET_NAME)])
Expand Down
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ APPVERSION_M=2
# This is the `spec_version` field of `Runtime`
APPVERSION_N=0
# This is the patch version of this release
APPVERSION_P=1
APPVERSION_P=2
4 changes: 1 addition & 3 deletions app/src/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,8 @@ zxerr_t crypto_fillDeviceSeed(uint8_t *device_seed) {
MEMCPY(device_seed, raw_privkey, KEY_LENGTH);

catch_cx_error:
if (error != zxerr_ok) {
MEMZERO(raw_privkey, 64);
}

MEMZERO(raw_privkey, 64);
return error;
}

Expand Down
4 changes: 2 additions & 2 deletions tests_zemu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/ledgerhq__hw-transport": "^4.21.6",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"blakejs": "^1.1.1",
"crypto-js": "4.2.0",
"ed25519-supercop": "^2.0.1",
Expand Down
Binary file modified tests_zemu/snapshots/fl-mainmenu/00004.png
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 tests_zemu/snapshots/s-mainmenu/00004.png
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 tests_zemu/snapshots/s-mainmenu/00010.png
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 tests_zemu/snapshots/sp-mainmenu/00004.png
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 tests_zemu/snapshots/sp-mainmenu/00010.png
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 tests_zemu/snapshots/st-mainmenu/00004.png
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 tests_zemu/snapshots/x-mainmenu/00004.png
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 tests_zemu/snapshots/x-mainmenu/00010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 16b0bb7

Please sign in to comment.