From 8869cb5bf3ec15fbac0b73d072312d23a4581788 Mon Sep 17 00:00:00 2001 From: wh02252983 Date: Tue, 12 Aug 2025 14:38:58 +0800 Subject: [PATCH] [CVE] add patch to fix CVE-2023-46048 To #N/A add patch to fix CVE-2023-46048 Project: TC2024080204 Signed-off-by: wh02252983 wh02252983@alibaba-inc.com --- texlive-2022-CVE-2023-46048.patch | 43 +++++++++++++++++++++++++++++++ texlive-base.spec | 8 +++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 texlive-2022-CVE-2023-46048.patch diff --git a/texlive-2022-CVE-2023-46048.patch b/texlive-2022-CVE-2023-46048.patch new file mode 100644 index 0000000..3720554 --- /dev/null +++ b/texlive-2022-CVE-2023-46048.patch @@ -0,0 +1,43 @@ +diff --git a/source/texk/web2c/pdftexdir/writet1.c b/source/texk/web2c/pdftexdir/writet1.c +index 079ac369..119f1bc3 100644 +--- a/source/texk/web2c/pdftexdir/writet1.c ++++ b/source/texk/web2c/pdftexdir/writet1.c +@@ -841,7 +841,10 @@ static char **t1_builtin_enc(void) + *t1_buf_array == '/' && valid_code(i)) { + if (strcmp(t1_buf_array + 1, notdef) != 0) + glyph_names[i] = xstrdup(t1_buf_array + 1); +- p = strstr(p, " put") + strlen(" put"); ++ p = strstr(p, " put"); ++ if (!p) ++ pdftex_fail("invalid pfb, no put found in dup"); ++ p += strlen(" put"); + skip(p, ' '); + } + /* +@@ -850,7 +853,10 @@ static char **t1_builtin_enc(void) + else if (sscanf(p, "dup dup %i exch %i get put", &b, &a) == 2 + && valid_code(a) && valid_code(b)) { + copy_glyph_names(glyph_names, a, b); +- p = strstr(p, " get put") + strlen(" get put"); ++ p = strstr(p, " get put"); ++ if (!p) ++ pdftex_fail("invalid pfb, no get put found in dup dup"); ++ p += strlen(" get put"); + skip(p, ' '); + } + /* +@@ -861,7 +867,10 @@ static char **t1_builtin_enc(void) + && valid_code(a) && valid_code(b) && valid_code(c)) { + for (i = 0; i < c; i++) + copy_glyph_names(glyph_names, a + i, b + i); +- p = strstr(p, " putinterval") + strlen(" putinterval"); ++ p = strstr(p, " putinterval"); ++ if (!p) ++ pdftex_fail("invalid pfb, no putinterval found in dup dup"); ++ p += strlen(" putinterval"); + skip(p, ' '); + } + /* +-- +2.43.5 + diff --git a/texlive-base.spec b/texlive-base.spec index 9ef12ec..3ba5d3b 100644 --- a/texlive-base.spec +++ b/texlive-base.spec @@ -1,4 +1,4 @@ -%define anolis_release 16 +%define anolis_release 17 %global shortname texlive %global source_date 20220321 %global source_name texlive-%{source_date}-source @@ -467,6 +467,8 @@ Patch45: texlive-2022-fix-latex-ltx.patch Patch46: texlive-base-20220321-fix-scripts.patch Patch47: texlive-2022-anolis-texmfcnf.lua.patch Patch48: texlive-2022-CVE-2023-32700.patch +# https://github.com/TeX-Live/texlive-source/commit/33b330bc48ed2df69daf80a81be3cde8bf794816 +Patch49: texlive-2022-CVE-2023-46048.patch BuildRequires: make gcc gcc-c++ autoconf automake libtool BuildRequires: xz bison flex file texinfo chrpath t1utils @@ -526,6 +528,7 @@ xz -dc %{SOURCE0} | tar x %patch32 -p1 -b .configure-no-GfxFont-decRefCnt %patch37 -p1 -b .libpaper2 %patch48 -p1 -b .CVE-2023-32700 +%patch49 -p1 -b .CVE-2023-46048 for l in `unxz -c %{SOURCE3} | tar t`; do ln -s %{_texdir}/licenses/$l $l @@ -1000,6 +1003,9 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %ghost %{_datadir}/texmf.rpmmoved %changelog +* Tue Aug 12 2025 wh02252983 - 10:20220321-17 +- add patch to fix CVE-2023-46048 + * Sun Apr 27 2025 Shangtong Guo - 10:20220321-16 - add support for riscv64 build -- Gitee