Title: [265303] trunk/Source/WebKit
Revision
265303
Author
[email protected]
Date
2020-08-05 13:47:16 -0700 (Wed, 05 Aug 2020)

Log Message

[Cocoa] Sandbox extension token not cleared from memory
https://bugs.webkit.org/show_bug.cgi?id=215136

Reviewed by Geoffrey Garen.

As a security mitigation, an invalidated sandbox extension should have its token cleared from memory.

No new tests, covered by existing tests.

* Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::m_length):
(WebKit::SandboxExtensionImpl::~SandboxExtensionImpl):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (265302 => 265303)


--- trunk/Source/WebKit/ChangeLog	2020-08-05 20:41:32 UTC (rev 265302)
+++ trunk/Source/WebKit/ChangeLog	2020-08-05 20:47:16 UTC (rev 265303)
@@ -1,5 +1,20 @@
 2020-08-05  Per Arne Vollan  <[email protected]>
 
+        [Cocoa] Sandbox extension token not cleared from memory
+        https://bugs.webkit.org/show_bug.cgi?id=215136
+
+        Reviewed by Geoffrey Garen.
+
+        As a security mitigation, an invalidated sandbox extension should have its token cleared from memory.
+
+        No new tests, covered by existing tests.
+
+        * Shared/Cocoa/SandboxExtensionCocoa.mm:
+        (WebKit::SandboxExtensionImpl::m_length):
+        (WebKit::SandboxExtensionImpl::~SandboxExtensionImpl):
+
+2020-08-05  Per Arne Vollan  <[email protected]>
+
         [Cocoa] Remove obsolete sandbox extension after r264178
         https://bugs.webkit.org/show_bug.cgi?id=215154
 

Modified: trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm (265302 => 265303)


--- trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm	2020-08-05 20:41:32 UTC (rev 265302)
+++ trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm	2020-08-05 20:47:16 UTC (rev 265303)
@@ -55,6 +55,10 @@
 
     ~SandboxExtensionImpl()
     {
+        if (!m_token)
+            return;
+        auto length = strlen(m_token);
+        memset_s(m_token, length, 0, length);
         free(m_token);
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to