Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
libfontenc (1:1.1.8-1deepin2) unstable; urgency=medium

* fix(cve): CVE-2026-109908 (high) - encparse: fix heap out-of-bounds
write in setCode() Upstream:
https://gitlab.freedesktop.org/xorg/lib/libfontenc/-
/commit/5920c6ee144fffff84b62f5b479171f734f15316

-- deepin-ci-robot <packages@deepin.org> Mon, 23 Nov 2026 16:35:12 +0800

libfontenc (1:1.1.8-1deepin1) unstable; urgency=medium

* Rebuild with LTO enabled (dpkg vendor feature optimize/lto).
Expand Down
23 changes: 23 additions & 0 deletions debian/patches/CVE-2026-109908.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Description: CVE-2026-109908 (high) - setCode() 中目标索引由 .enc 编码文件中攻击者可控的两个值计算:index = (from >> 8) * row_size + (from & 0xFF)。from <= 0xFFFF,故 from >> 8 可达 0xFF;row_size 直接取自编码文件的 SIZE 行。目标缓冲区分配上限为 0x10000 项,当 row_size > 256 时索引超出分配范围,造成堆越界写。此外列边界检查错误地使用了全局变量 value1 而非函数参数 from,对 CODE_RANGE_LINE 和 CODE_UNDEFINE_LINE 会导致错误判定。
Author: Peter Hutterer <peter.hutterer@who-t.net>
Origin: https://gitlab.freedesktop.org/xorg/lib/libfontenc/-/commit/5920c6ee144fffff84b62f5b479171f734f15316
Bug: https://nvd.nist.gov/vuln/detail/CVE-2026-109908
Last-Update: 2026-09-16
---
diff --git a/src/encparse.c b/src/encparse.c
index bf9ea23..30b154f 100644
--- a/src/encparse.c
+++ b/src/encparse.c
@@ -455,9 +455,11 @@ setCode(unsigned from, unsigned to, unsigned row_size,
if (row_size == 0)
index = from;
else {
- if ((value1 & 0xFF) >= row_size)
+ if ((from & 0xFF) >= row_size)
return 0; /* ignore out of range mappings */
index = (from >> 8) * row_size + (from & 0xFF);
+ if (index > 0xFFFF)
+ return 0; /* ignore mappings that exceed the encoding size */
}

/* Optimize away useless identity mappings. This is only expected
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CVE-2026-109908.patch
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
Loading