[webkit-changes] [WebKit/WebKit] 8e6b97: REGRESSION(281282 at main): Web process may crash whe...
Abrar Rahman Protyasha
noreply at github.com
Wed Oct 16 11:09:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8e6b970bb491b02ea8ce787a105f2d9ea1f01858
https://github.com/WebKit/WebKit/commit/8e6b970bb491b02ea8ce787a105f2d9ea1f01858
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-10-16 (Wed, 16 Oct 2024)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
REGRESSION(281282 at main): Web process may crash when using back/forward navigation buttons in Safari on page with encrypted PDF
https://bugs.webkit.org/show_bug.cgi?id=281535
rdar://137973796
Reviewed by Wenson Hsieh.
With Unified PDF enabled, we can induce a web content process crash by
navigating back-and-forth on an encrypted document and then entering the
password on the multiple password forms presented to us.
This crash happens because we try to access the presentation controller
instance of a torn down plugin (which is what the stray password form
points to). This patch addresses the crash by fixing the pre-existing
issue of stray password forms from previous navigations, which affects
both the legacy plugin and the Unified PDF plugin.
We do so by introducing PDFPluginBase::teardownPasswordEntryForm, which
we call into when tearing down a locked PDF. This way, each plugin
override can get to decide what tearing down the password form means.
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::teardownPasswordEntryForm):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm:
(WebKit::PDFPluginBase::teardown):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::teardown):
(WebKit::UnifiedPDFPlugin::teardownPasswordEntryForm):
Canonical link: https://commits.webkit.org/285282@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list