-
Notifications
You must be signed in to change notification settings - Fork 699
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
imgtool.py dumpinfo crash with struct.error #1976
Comments
Thank you for raising the issue. I signed a test image with ecdsa-p256 using your |
When adding the debug code of debug_crash.diff and repeat the test with blank.hex I get following ouput:
hex and diff files: hex_and_diffs.zip |
I've been seeing this behaviour literally with any image thas's generated on zephyr's latest release. Even when I try dumping from an unsigned image. |
Ok, so this is the issue then. |
During testing imgtool I recognized that
python imgtool.py dumpinfo ...
crashes with following error:The key used for testing was generated with following command:
python imgtool.py keygen -k test_keys.pem -t ecdsa-p256
The image was signed with:
python imgtool.py sign -k test_keys.pem -v 1.0 -H 256 --pad-header -S 0x0000 "C:\temp\mcuboot_fw.hex" "C:\temp\mcuboot_fw_signed.hex"
When checking the file with
python verify
everthing looks fine. Only when the dumpinfo command is used the program crash.Short investigation
When adding following code before the command that crash in dumpinfo.py", line 90:
following results are printed
For whatever reason the tlv offset is bigger than the available data, which leads to the crash.
The text was updated successfully, but these errors were encountered: