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

Temporarily revert U2F sig check for Ledger U2F transport support #8995

Merged
merged 1 commit into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/device/fido/authenticator_get_assertion_response.cc b/device/fido/authenticator_get_assertion_response.cc
index 833dbe83c042d035616a92f223e88f89c343dcec..55361ece642e244ae68134858d6ca72b24b0e7f9 100644
--- a/device/fido/authenticator_get_assertion_response.cc
+++ b/device/fido/authenticator_get_assertion_response.cc
@@ -54,7 +54,7 @@ AuthenticatorGetAssertionResponse::CreateFromU2fSignResponse(

bssl::UniquePtr<ECDSA_SIG> parsed_sig(
ECDSA_SIG_from_bytes(signature.data(), signature.size()));
- if (!parsed_sig) {
+ if (false && !parsed_sig) {
FIDO_LOG(ERROR)
<< "Rejecting U2F assertion response with invalid signature";
return base::nullopt;
22 changes: 22 additions & 0 deletions patches/device-fido-virtual_u2f_device.cc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/device/fido/virtual_u2f_device.cc b/device/fido/virtual_u2f_device.cc
index 789c81b88dbf4f505d8f39e4e3ace9fbe97bcd44..afd6ecb22ebae8ceed5427800933e2a6c77030d5 100644
--- a/device/fido/virtual_u2f_device.cc
+++ b/device/fido/virtual_u2f_device.cc
@@ -148,7 +148,7 @@ base::Optional<std::vector<uint8_t>> VirtualU2fDevice::DoRegister(

if (mutable_state()->u2f_invalid_public_key) {
// Flip a bit in the x-coordinate, which will push the point off the curve.
- x962[10] ^= 1;
+ // x962[10] ^= 1;
}

// Our key handles are simple hashes of the public key.
@@ -253,7 +253,7 @@ base::Optional<std::vector<uint8_t>> VirtualU2fDevice::DoSign(
if (mutable_state()->u2f_invalid_signature) {
// Flip a bit in the ASN.1 header to make the signature structurally
// invalid.
- sig[0] ^= 1;
+ // sig[0] ^= 1;
}

// Add signature for full response.