Bug 224838 - [SOUP] Null pointer dereference in ResourceLoader::didReceiveAuthenticationChallenge
Summary: [SOUP] Null pointer dereference in ResourceLoader::didReceiveAuthenticationCh...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-20 15:48 PDT by Michael Catanzaro
Modified: 2021-04-22 15:31 PDT (History)
8 users (show)

See Also:


Attachments
Patch (1.48 KB, patch)
2021-04-22 10:13 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2021-04-20 15:48:19 PDT
[840/1793] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-c57e08af-6.cpp.o
In file included from WebCore/DerivedSources/unified-sources/UnifiedSource-c57e08af-6.cpp:3:
../../Source/WebCore/loader/ResourceLoader.cpp: In member function ‘virtual void WebCore::ResourceLoader::didReceiveAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&)’:
../../Source/WebCore/loader/ResourceLoader.cpp:809:81: warning: ‘this’ pointer is null [-Wnonnull]
  809 |     challenge.authenticationClient()->receivedRequestToContinueWithoutCredential(challenge);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

At first I incorrectly thought this was a false positive, but in bug #224452, Chris noticed that our AuthenticationChallenge::authenticationClient now always returns nullptr. That is no good. Carlos, I guess this is not quite what you had intended?
Comment 1 Carlos Garcia Campos 2021-04-22 07:51:42 PDT
I think that code is never actually reached, that's only used by ResourceHandle which is no longer supported by the soup based ports. The soup implementation of ResourceHandle::receivedRequestToContinueWithoutCredential() is an assert.
Comment 2 Michael Catanzaro 2021-04-22 10:13:00 PDT
Created attachment 426825 [details]
Patch
Comment 3 EWS 2021-04-22 15:31:09 PDT
Committed r276471 (236931@main): <https://commits.webkit.org/236931@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426825 [details].