Commit 0409d29d authored by Callum May's avatar Callum May Committed by Commit Bot

Add raw pointer check to IsUserVerifyingPlatformAuthenticatorAvailableImpl

Edge has been receiving reports of null pointer crashes similar to the
linked bug. We believe they are caused by
AuthenticatorCommon::IsUserVerifyingPlatformAuthenticatorAvailable
passing in a null delegate since
ContentBrowserClient::GetWebAuthenticationRequestDelegate
may return a nullptr if the embedder can't service the request.

To fix this we can check the pointer before calling the delegate

Bug: 1110081
Change-Id: I007a8815fb23e86e025e2ccafb2bcc74d40aebfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2423049
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#814152}
parent 0ccbfbcb
......@@ -497,6 +497,12 @@ bool IsUserVerifyingPlatformAuthenticatorAvailableImpl(
AuthenticatorRequestClientDelegate* delegate,
device::FidoDiscoveryFactory* discovery_factory,
BrowserContext* browser_context) {
if (!delegate) {
// TODO(crbug/1110081): Investigate why this can be nullptr.
NOTREACHED();
return false;
}
base::Optional<bool> is_uvpaa_override =
delegate->IsUserVerifyingPlatformAuthenticatorAvailableOverride();
if (is_uvpaa_override) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment