From d72f4ce68f37434cbf396ba936d109d921749d17 Mon Sep 17 00:00:00 2001 From: yangl777 Date: Mon, 14 Jul 2025 07:04:37 +0000 Subject: [PATCH] fix CVE-2025-6141 --- backport-CVE-2025-6141.patch | 33 +++++++++++++++++++++++++++++++++ ncurses.spec | 9 ++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 backport-CVE-2025-6141.patch diff --git a/backport-CVE-2025-6141.patch b/backport-CVE-2025-6141.patch new file mode 100644 index 0000000..764adf9 --- /dev/null +++ b/backport-CVE-2025-6141.patch @@ -0,0 +1,33 @@ +From 27d1493340d714e7be6e08c0a8f43e48276149c4 Mon Sep 17 00:00:00 2001 +From: "Thomas E. Dickey" +Date: Sat, 29 Mar 2025 22:52:37 +0000 +Subject: [PATCH] snapshot of project "ncurses", label v6_5_20250329 + +Conflict:remove unnecessary modifications +Reference:https://github.com/ThomasDickey/ncurses-snapshots/commit/27d1493340d714e7be6e08c0a8f43e48276149c4 +--- + ncurses/tinfo/parse_entry.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c +index a2278c07f..c551c780b 100644 +--- a/ncurses/tinfo/parse_entry.c ++++ b/ncurses/tinfo/parse_entry.c +@@ -48,7 +48,7 @@ + #include + #include + +-MODULE_ID("$Id: parse_entry.c,v 1.108 2023/04/24 22:32:33 tom Exp $") ++MODULE_ID("$Id: parse_entry.c,v 1.116 2025/03/24 22:27:29 tom Exp $") + + #ifdef LINT + static short const parametrized[] = +@@ -990,6 +990,8 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base) + bp = tp->Strings[from_ptr->nte_index]; + if (VALID_STRING(bp)) { + for (dp = buf2; *bp; bp++) { ++ if ((size_t) (dp - buf2) >= (sizeof(buf2) - sizeof(TERMTYPE2))) ++ break; + if (bp[0] == '$' && bp[1] == '<') { + while (*bp && *bp != '>') { + ++bp; diff --git a/ncurses.spec b/ncurses.spec index 72c8a94..7832a5d 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -1,6 +1,6 @@ Name: ncurses Version: 6.3 -Release: 15 +Release: 16 Summary: Terminal control library License: MIT URL: https://invisible-island.net/ncurses/ncurses.html @@ -17,6 +17,7 @@ Patch16: backport-fix-for-out-of-memory-condition.patch Patch17: backport-fix-coredump-when-use-Memmove.patch Patch18: backport-CVE-2023-50495.patch Patch19: backport-CVE-2023-45918.patch +Patch20: backport-CVE-2025-6141.patch BuildRequires: gcc gcc-c++ gpm-devel pkgconfig @@ -252,6 +253,12 @@ xz NEWS %{_mandir}/man7/* %changelog +* Mon Jul 14 2025 yanglu - 6.3-16 +- Type:CVE +- CVE:CVE-2025-6141 +- SUG:NA +- DESC:fix CVE-2025-6141 + * Wed Feb 28 2024 liutie - 6.3-15 - Type:bugfix - ID:NA -- Gitee