diff options
author | Peter Marko <peter.marko@siemens.com> | 2025-07-25 00:13:24 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-08-04 09:12:23 -0700 |
commit | b9ef51c44e64c0e56d9edd258e9b8642937cf35d (patch) | |
tree | c68e18517e3b53f86922f31da94e5cc0047574e2 | |
parent | c9d46475eba1e4de8409cd74c1df61dc81f29ae2 (diff) | |
download | poky-b9ef51c44e64c0e56d9edd258e9b8642937cf35d.tar.gz |
ncurses: patch CVE-2025-6141
Pick relevant part of snapshot commit 20250329, see [1].
That has:
add a buffer-limit check in postprocess_termcap (report/testcase by
Yifan Zhang).
[1] https://invisible-island.net/ncurses/NEWS.html#index-t20250329
(From OE-Core rev: 408f1d820616d2bf73cbd319b911885d79d3ca9d)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/recipes-core/ncurses/files/CVE-2025-6141.patch | 25 | ||||
-rw-r--r-- | meta/recipes-core/ncurses/ncurses_6.5.bb | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-core/ncurses/files/CVE-2025-6141.patch b/meta/recipes-core/ncurses/files/CVE-2025-6141.patch new file mode 100644 index 0000000000..ec7e8a94e4 --- /dev/null +++ b/meta/recipes-core/ncurses/files/CVE-2025-6141.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 27d1493340d714e7be6e08c0a8f43e48276149c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Thomas E. Dickey" <dickey@invisible-island.net> | ||
3 | Date: Sat, 29 Mar 2025 22:52:37 +0000 | ||
4 | Subject: [PATCH] snapshot of project "ncurses", label v6_5_20250329 | ||
5 | |||
6 | CVE: CVE-2025-6141 | ||
7 | Upstream-Status: Backport [https://github.com/ThomasDickey/ncurses-snapshots/commit/27d1493340d714e7be6e08c0a8f43e48276149c4] | ||
8 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
9 | --- | ||
10 | ncurses/tinfo/parse_entry.c | 2 ++ | ||
11 | 1 file changed, 2 insertions(+) | ||
12 | |||
13 | diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c | ||
14 | index a2278c07..c551c780 100644 | ||
15 | --- a/ncurses/tinfo/parse_entry.c | ||
16 | +++ b/ncurses/tinfo/parse_entry.c | ||
17 | @@ -985,6 +985,8 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base) | ||
18 | bp = tp->Strings[from_ptr->nte_index]; | ||
19 | if (VALID_STRING(bp)) { | ||
20 | for (dp = buf2; *bp; bp++) { | ||
21 | + if ((size_t) (dp - buf2) >= (sizeof(buf2) - sizeof(TERMTYPE2))) | ||
22 | + break; | ||
23 | if (bp[0] == '$' && bp[1] == '<') { | ||
24 | while (*bp && *bp != '>') { | ||
25 | ++bp; | ||
diff --git a/meta/recipes-core/ncurses/ncurses_6.5.bb b/meta/recipes-core/ncurses/ncurses_6.5.bb index 2e3ee337ea..83de792d89 100644 --- a/meta/recipes-core/ncurses/ncurses_6.5.bb +++ b/meta/recipes-core/ncurses/ncurses_6.5.bb | |||
@@ -4,6 +4,7 @@ SRC_URI += "file://0001-tic-hang.patch \ | |||
4 | file://0002-configure-reproducible.patch \ | 4 | file://0002-configure-reproducible.patch \ |
5 | file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \ | 5 | file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \ |
6 | file://exit_prototype.patch \ | 6 | file://exit_prototype.patch \ |
7 | file://CVE-2025-6141.patch \ | ||
7 | " | 8 | " |
8 | # commit id corresponds to the revision in package version | 9 | # commit id corresponds to the revision in package version |
9 | SRCREV = "1c55d64d9d3e00399a21f04e9cac1e472ab5f70a" | 10 | SRCREV = "1c55d64d9d3e00399a21f04e9cac1e472ab5f70a" |