Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d47452669e1a790e1725397df6825236e6610170
https://github.com/WebKit/WebKit/commit/d47452669e1a790e1725397df6825236e6610170
Author: Zak Ridouh <[email protected]>
Date: 2026-05-14 (Thu, 14 May 2026)
Changed paths:
M Source/WTF/wtf/StdLibExtras.h
M Source/WebCore/platform/graphics/Color.h
Log Message:
-----------
[MTE] Harden `WebCore::Color` and `WebCore::Color::OutOfLineComponents`
objects
<https://bugs.webkit.org/show_bug.cgi?id=306157>
<rdar://168435437>
Reviewed by Darin Adler.
`WebCore::Color` is made of a single field that contains flags in the upper bits
and can eventually contain a pointer to an `OutOfLineComponents` as well.
This compact pointer is untagged by libpas, so we should manually clear it
to prevent any security issues if the Color object is Use After Free'd.
Annotate `secureZeroBytes` and `secureZeroSpan` with `NODELETE` so the
safer-cpp static analyzer can prove that calling them from `~Color()` does
not run any destructor or free memory.
* Source/WTF/wtf/StdLibExtras.h:
(WTF::secureZeroSpan):
(WTF::secureZeroBytes):
* Source/WebCore/platform/graphics/Color.h:
(WebCore::Color::~Color):
Originally-landed-as: 305413.270@safari-7624-branch (ff676342841b).
rdar://173969087
Canonical link: https://commits.webkit.org/313292@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications