⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 274027 in webkit


Ignore:
Timestamp:
Mar 5, 2021, 6:56:21 PM (5 years ago)
Author:
Chris Dumez
Message:

[IPC Hardening] Protect against bad navigationID in WebPageProxy::didDestroyNavigation()
https://bugs.webkit.org/show_bug.cgi?id=222842
<rdar://problem/75119560>

Reviewed by Darin Adler.

  • UIProcess/WebNavigationState.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didDestroyNavigation):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r274026 r274027  
     12021-03-05  Chris Dumez  <cdumez@apple.com>
     2
     3        [IPC Hardening] Protect against bad navigationID in WebPageProxy::didDestroyNavigation()
     4        https://bugs.webkit.org/show_bug.cgi?id=222842
     5        <rdar://problem/75119560>
     6
     7        Reviewed by Darin Adler.
     8
     9        * UIProcess/WebNavigationState.h:
     10        * UIProcess/WebPageProxy.cpp:
     11        (WebKit::WebPageProxy::didDestroyNavigation):
     12
    1132021-03-05  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WebKit/UIProcess/WebNavigationState.h

    r273023 r274027  
    6868    }
    6969
     70    using NavigationMap = HashMap<uint64_t, RefPtr<API::Navigation>>;
     71
    7072private:
    71     HashMap<uint64_t, RefPtr<API::Navigation>> m_navigations;
     73    NavigationMap m_navigations;
    7274    uint64_t m_navigationID { 0 };
    7375};
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r273997 r274027  
    43764376void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
    43774377{
     4378    MESSAGE_CHECK(m_process, WebNavigationState::NavigationMap::isValidKey(navigationID));
     4379
    43784380    PageClientProtector protector(pageClient());
    43794381
     
    43824384        return;
    43834385
    4384     // FIXME: Message check the navigationID.
    43854386    m_navigationState->didDestroyNavigation(navigationID);
    43864387}
Note: See TracChangeset for help on using the changeset viewer.