Changeset 232451 in webkit
- Timestamp:
- Jun 3, 2018, 11:28:07 AM (8 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
-
WebProcess/cocoa/VideoFullscreenManager.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r232447 r232451 1 2018-06-03 Brent Fulgham <bfulgham@apple.com> 2 3 Make sure that the fencePort received over IPC has the expected disposition (SEND) 4 https://bugs.webkit.org/show_bug.cgi?id=186211 5 <rdar://problem/37814171> 6 7 Reviewed by Geoffrey Garen. 8 9 It is possible (though very unlikely) for a message to be recevied that has the wrong mach port disposition. 10 If this happens, we shouldn't manipulate the passed mach_port_t or pass it on to other API. We already 11 drop messages that violate this expectation in the IPC layer, but code handling IPC::Attachment data types 12 are not checking this value. 13 14 * WebProcess/WebPage/WebPage.cpp: 15 (WebKit::WebPage::setTopContentInsetFenced): 16 * WebProcess/cocoa/VideoFullscreenManager.mm: 17 (WebKit::VideoFullscreenManager::setVideoLayerFrameFenced): 18 1 19 2018-06-02 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r232427 r232451 2666 2666 void WebPage::setTopContentInsetFenced(float contentInset, IPC::Attachment fencePort) 2667 2667 { 2668 if (fencePort.disposition() != MACH_MSG_TYPE_MOVE_SEND) { 2669 LOG(Layers, "WebPage::setTopContentInsetFenced(%g, fencePort) Received an invalid fence port: %d, disposition: %d", contentInset, fencePort.port(), fencePort.disposition()); 2670 return; 2671 } 2672 2668 2673 m_drawingArea->addFence(MachSendRight::create(fencePort.port())); 2669 2674 -
trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm
r230269 r232451 565 565 LOG(Fullscreen, "VideoFullscreenManager::setVideoLayerFrameFenced(%p, %x)", this, contextId); 566 566 567 if (fencePort.disposition() != MACH_MSG_TYPE_MOVE_SEND) { 568 LOG(Fullscreen, "VideoFullscreenManager::setVideoLayerFrameFenced(%p, %x) Received an invalid fence port: %d, disposition: %d", this, contextId, fencePort.port(), fencePort.disposition()); 569 return; 570 } 571 567 572 RefPtr<VideoFullscreenModelVideoElement> model; 568 573 RefPtr<VideoFullscreenInterfaceContext> interface; … … 574 579 } 575 580 576 if ( interface->layerHostingContext())577 interface->layerHostingContext()->setFencePort(fencePort.port());581 if (auto* context = interface->layerHostingContext()) 582 context->setFencePort(fencePort.port()); 578 583 model->setVideoLayerFrame(bounds); 579 584 deallocateSendRightSafely(fencePort.port());
Note:
See TracChangeset
for help on using the changeset viewer.