chromium_ots:基于 OpenHarmony 的 OpenType 字体安全处理项目

OpenType Sanitizer (OTS):一个字体文件“消毒”库。它解析并清理 Web 字体(TTF, WOFF2 等),以防止恶意字体文件利用渲染引擎的漏洞。 核心安全组件。在渲染任何 Web 字体之前,Chromium 必须使用 OTS 对其进行处理,以防范 RCE(远程代码执行)攻击。

分支7Tags0
文件最后提交记录最后更新时间
4 年前
4 年前
3 年前
3 年前
4 年前
4 年前
3 年前
6 年前
9 年前
4 年前
4 年前
6 年前

Build Fuzzing Status

OpenType Sanitizer

The OpenType Sanitizer (OTS) parses and serializes OpenType files (OTF, TTF) and WOFF and WOFF2 font files, validating them and sanitizing them as it goes.

The C library is integrated into Chromium and Firefox, and also simple command line tools to check files offline in a Terminal.

The CSS font-face property is great for web typography. Having to use images in order to get the correct typeface is a great sadness; one should be able to use vectors.

However, on many platforms the system-level TrueType font renderers have never been part of the attack surface before, and putting them on the front line is a scary proposition... Especially on platforms like Windows, where it's a closed-source blob running with high privilege.

Building from source

Instructions below are for building standalone OTS utilities, if you want to use OTS as a library then the recommended way is to copy the source code and integrate it into your existing build system. Our build system does not build a shared library intentionally.

Build OTS:

$ meson build
$ ninja -C build

Run the tests (if you wish):

$ ninja -C build test

Usage

See docs


Thanks to Alex Russell for the original idea.

项目介绍

OpenType Sanitizer (OTS):一个字体文件“消毒”库。它解析并清理 Web 字体(TTF, WOFF2 等),以防止恶意字体文件利用渲染引擎的漏洞。 核心安全组件。在渲染任何 Web 字体之前,Chromium 必须使用 OTS 对其进行处理,以防范 RCE(远程代码执行)攻击。

https://gitcode.com/openharmony-sig/chromium_ots定制我的领域