What changed, and why it matters
This commit removes an early 'return' statement in the Sui transaction-checking function on the Keystone 3 hardware wallet. Before the fix, the function would immediately return a blank 'success' result without validating the master fingerprint or inspecting the transaction. That means a malicious or malformed Sui transaction request could bypass the normal security checks the device is supposed to perform. The fix allows the intended validation code to run.
Review whether this bug was present in any released firmware version. If it was, treat it as a security fix: assign a CVE, publish an advisory, and advise users to upgrade. Also audit other blockchain check_request functions for similar unconditional early-return bugs.
Security signals we found
Unconditional early return bypasses authentication/validation logic
Function intended to verify Sui transaction requests returned success without inspection
Master fingerprint length check was unreachable before the fix
Patch removes a single line, restoring intended defensive checks
Evidence from the diff
In rust/rust_c/src/sui/mod.rs, the first line of sui_check_request was return TransactionCheckResult::new().c_ptr();. This unconditional early return prevented all subsequent code from executing, including the 4-byte master-fingerprint length check and any transaction parsing/validation logic. The patch deletes that line so the function proceeds with validation. The effect is that previously the C/Rust boundary would report a successful check for any Sui request regardless of content, effectively disabling the check.
Changed components
Keystone 3 firmwareSui blockchain supportrust/rust_c/src/sui/mod.rssui_check_request FFI functionInspect captured patch +0 / −1
diff --git a/rust/rust_c/src/sui/mod.rs b/rust/rust_c/src/sui/mod.rs
index db414e8..baa5059 100644
--- a/rust/rust_c/src/sui/mod.rs
+++ b/rust/rust_c/src/sui/mod.rs
@@ -42,7 +42,6 @@ pub unsafe extern "C" fn sui_check_request(
master_fingerprint: PtrBytes,
length: u32,
) -> PtrT<TransactionCheckResult> {
- return TransactionCheckResult::new().c_ptr();
if length != 4 {
return TransactionCheckResult::from(RustCError::InvalidMasterFingerprint).c_ptr();
}
Why this scored 64/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.