Skip to content
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

Max APDU buffer size checks #276

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

amendelzon
Copy link
Collaborator

  • Renaming empty buffer error to more generic invalid buffer error
  • Added max buffer size checks on powHSM, Ledger UI bootloader and Ledger UI heartbeat main I/O logic
  • Removed lower untrusted SGX & TCPSigner I/O layer disconnection on inconsistent request
  • Added request buffer emptying after an inconsistent request to untrusted SGX & TCPSigner I/O layer
  • Added new RawCommand test type to firmware test framework
  • Added test cases for empty APDU and oversized APDU to firmware tests
  • Added test cases for Ledger UI bootloader and Ledger UI heartbeat

- Renaming empty buffer error to more generic invalid buffer error
- Added max buffer size checks on powHSM, Ledger UI bootloader and Ledger UI heartbeat main I/O logic
- Removed lower untrusted SGX & TCPSigner I/O layer disconnection on inconsistent request
- Added request buffer emptying after an inconsistent request to untrusted SGX & TCPSigner I/O layer
- Added new RawCommand test type to firmware test framework
- Added test cases for empty APDU and oversized APDU to firmware tests
- Added test cases for Ledger UI bootloader and Ledger UI heartbeat
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files


# Normal result expectation
if not is_nonempty_hex_string(self.expected):
self.expected = None

Check warning

Code scanning / CodeQL

Overwriting attribute in super-class or sub-class Warning test

Assignment overwrites attribute expected, which was previously defined in superclass
TestCase
.
Assignment overwrites attribute expected, which was previously defined in superclass
TestCase
.
if not is_nonempty_hex_string(self.expected):
self.expected = None
else:
self.expected = bytes.fromhex(self.expected)

Check warning

Code scanning / CodeQL

Overwriting attribute in super-class or sub-class Warning test

Assignment overwrites attribute expected, which was previously defined in superclass
TestCase
.
Assignment overwrites attribute expected, which was previously defined in superclass
TestCase
.
Copy link
Collaborator

@italo-sampaio italo-sampaio left a comment

Choose a reason for hiding this comment

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

LGTM!

@amendelzon amendelzon merged commit 799ea32 into master Jan 22, 2025
8 checks passed
@amendelzon amendelzon deleted the fix/max-apdu-buffer-size-check branch January 22, 2025 20:54
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