WebKit Bugzilla
Attachment 357284 Details for
Bug 192061
: [WebAuthN] Change the nonce in the CTAP kInit command to weak random values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Part 2.
bug-192061-20181213185933.patch (text/plain), 6.82 KB, created by
Jiewen Tan
on 2018-12-13 18:59:34 PST
(
hide
)
Description:
Part 2.
Filename:
MIME Type:
Creator:
Jiewen Tan
Created:
2018-12-13 18:59:34 PST
Size:
6.82 KB
patch
obsolete
>Subversion Revision: 238939 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index df33b97d544c57eb3426f6c4fb5f03db5b350f25..e3a63e4663f37fdb1593da5f8d60c47ec8d24eb6 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,29 @@ >+2018-12-13 Jiewen Tan <jiewen_tan@apple.com> >+ >+ [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky >+ https://bugs.webkit.org/show_bug.cgi?id=192061 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Part 2. >+ >+ Add some additional temporary logging info. Since the failure cannot be reproduced easily by human, we have to >+ rely on the test infrastructure to reporoduce it. Once the bug is determined and fixed, we should remove all >+ logging added in this patch. >+ >+ * UIProcess/WebAuthentication/Cocoa/HidService.mm: >+ (WebKit::HidService::deviceAdded): >+ * UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp: >+ (WebKit::CtapHidAuthenticator::makeCredential): >+ (WebKit::CtapHidAuthenticator::getAssertion): >+ * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: >+ (WebKit::CtapHidDriver::Worker::write): >+ (WebKit::CtapHidDriver::Worker::read): >+ (WebKit::CtapHidDriver::Worker::returnMessage): >+ (WebKit::CtapHidDriver::transact): >+ (WebKit::CtapHidDriver::continueAfterChannelAllocated): >+ (WebKit::CtapHidDriver::continueAfterResponseReceived): >+ > 2018-12-06 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard >diff --git a/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm b/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm >index 988e96b5727f890281f8fb829b20f552532210f5..237b1b460728119132df79839ca6764535d63eef 100644 >--- a/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm >+++ b/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm >@@ -93,6 +93,8 @@ void HidService::deviceAdded(IOHIDDeviceRef device) > { > auto driver = std::make_unique<CtapHidDriver>(createHidConnection(device)); > // Get authenticator info from the device. >+ // FIXME(192061) >+ LOG_ERROR("Start asking device info."); > driver->transact(encodeEmptyAuthenticatorRequest(CtapRequestCommand::kAuthenticatorGetInfo), [weakThis = makeWeakPtr(*this), ptr = driver.get()](Vector<uint8_t>&& response) { > ASSERT(RunLoop::isMain()); > if (!weakThis) >diff --git a/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp b/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp >index 2a4bd196ebd4a37679232e09f5cec3297f0f13ce..ab42af66f91079a197d5c3d3bc872be2a3577126 100644 >--- a/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp >+++ b/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp >@@ -49,6 +49,8 @@ CtapHidAuthenticator::CtapHidAuthenticator(std::unique_ptr<CtapHidDriver>&& driv > > void CtapHidAuthenticator::makeCredential() > { >+ // FIXME(192061) >+ LOG_ERROR("Start making credentials."); > auto cborCmd = encodeMakeCredenitalRequestAsCBOR(requestData().hash, requestData().creationOptions, m_info.options().userVerificationAvailability()); > m_driver->transact(WTFMove(cborCmd), [weakThis = makeWeakPtr(*this)](Vector<uint8_t>&& data) { > ASSERT(RunLoop::isMain()); >@@ -70,6 +72,8 @@ void CtapHidAuthenticator::continueMakeCredentialAfterResponseReceived(Vector<ui > > void CtapHidAuthenticator::getAssertion() > { >+ // FIXME(192061) >+ LOG_ERROR("Start getting assertions."); > auto cborCmd = encodeGetAssertionRequestAsCBOR(requestData().hash, requestData().requestOptions, m_info.options().userVerificationAvailability()); > m_driver->transact(WTFMove(cborCmd), [weakThis = makeWeakPtr(*this)](Vector<uint8_t>&& data) { > ASSERT(RunLoop::isMain()); >diff --git a/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp b/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp >index 77e2271fbd4afa13341b626eb5d80775a579be6e..f2155890f5c24ee45d97fa026ae71b1b6027dd65 100644 >--- a/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp >+++ b/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp >@@ -69,6 +69,8 @@ void CtapHidDriver::Worker::transact(fido::FidoHidMessage&& requestMessage, Mess > void CtapHidDriver::Worker::write(HidConnection::DataSent sent) > { > ASSERT(m_state == State::Write); >+ // FIXME(192061) >+ LOG_ERROR("Start writing data."); > if (sent != HidConnection::DataSent::Yes) { > returnMessage(std::nullopt); > return; >@@ -96,6 +98,8 @@ void CtapHidDriver::Worker::write(HidConnection::DataSent sent) > void CtapHidDriver::Worker::read(const Vector<uint8_t>& data) > { > ASSERT(m_state == State::Read); >+ // FIXME(192061) >+ LOG_ERROR("Start reading data."); > if (!m_responseMessage) { > m_responseMessage = FidoHidMessage::createFromSerializedData(data); > // The first few reports could be for other applications, and therefore ignore those. >@@ -126,6 +130,8 @@ void CtapHidDriver::Worker::read(const Vector<uint8_t>& data) > > void CtapHidDriver::Worker::returnMessage(std::optional<fido::FidoHidMessage>&& message) > { >+ // FIXME(192061) >+ LOG_ERROR("Start returning data."); > m_state = State::Idle; > m_connection->unregisterDataReceivedCallback(); > m_callback(WTFMove(message)); >@@ -146,6 +152,8 @@ void CtapHidDriver::transact(Vector<uint8_t>&& data, ResponseCallback&& callback > m_responseCallback = WTFMove(callback); > > // Allocate a channel. >+ // FIXME(192061) >+ LOG_ERROR("Start allocating a channel."); > ASSERT(m_nonce.size() == kHidInitNonceLength); > cryptographicallyRandomValues(m_nonce.data(), m_nonce.size()); > auto initCommand = FidoHidMessage::create(m_channelId, FidoHidDeviceCommand::kInit, m_nonce); >@@ -187,6 +195,8 @@ void CtapHidDriver::continueAfterChannelAllocated(std::optional<FidoHidMessage>& > m_channelId |= static_cast<uint32_t>(payload[index++]) << 8; > m_channelId |= static_cast<uint32_t>(payload[index]); > // FIXME(191534): Check the reset of the payload. >+ // FIXME(192061) >+ LOG_ERROR("Start sending the request."); > auto cmd = FidoHidMessage::create(m_channelId, FidoHidDeviceCommand::kCbor, m_requestData); > ASSERT(cmd); > m_worker->transact(WTFMove(*cmd), [weakThis = makeWeakPtr(*this)](std::optional<FidoHidMessage>&& response) mutable { >@@ -201,6 +211,8 @@ void CtapHidDriver::continueAfterResponseReceived(std::optional<fido::FidoHidMes > { > ASSERT(m_state == State::Ready); > ASSERT(!message || message->channelId() == m_channelId); >+ // FIXME(192061) >+ LOG_ERROR("Start returning the response."); > returnResponse(message ? message->getMessagePayload() : Vector<uint8_t>()); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192061
:
356665
|
357284
|
357480
|
357622
|
357969
|
358635
|
358758
|
358844
|
358846
|
358851