summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-05-11 22:50:51 +0200
committerSteve Sakoman <steve@sakoman.com>2025-05-16 08:58:06 -0700
commitb497f2caf78f21b12927c76967921c84c1f134e5 (patch)
treeb8f8ad1d5e07adcd9c99c925a403bb2a1629c500 /meta/recipes-devtools
parent8c0982c306cbaf9acbf93d9987f9df0dda7c536c (diff)
downloadpoky-b497f2caf78f21b12927c76967921c84c1f134e5.tar.gz
perl: patch CVE-2024-56406
Pick patch mentioned in NVD links for this CVE. Tested by runniing ptest and CVE reproducer (before&after). Ptest fails on test dist/threads/t/join, however the same test also fails without this patch. (From OE-Core rev: 8e3c821e9ce8f3a9667847a284bc5a6f4973ea13) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/perl/files/0001-CVE-2024-56406-Heap-buffer-overflow-with-tr.patch30
-rw-r--r--meta/recipes-devtools/perl/perl_5.34.3.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/files/0001-CVE-2024-56406-Heap-buffer-overflow-with-tr.patch b/meta/recipes-devtools/perl/files/0001-CVE-2024-56406-Heap-buffer-overflow-with-tr.patch
new file mode 100644
index 0000000000..377ef95f12
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-CVE-2024-56406-Heap-buffer-overflow-with-tr.patch
@@ -0,0 +1,30 @@
1From 87f42aa0e0096e9a346c9672aa3a0bd3bef8c1dd Mon Sep 17 00:00:00 2001
2From: Karl Williamson <khw@cpan.org>
3Date: Wed, 18 Dec 2024 18:25:29 -0700
4Subject: [PATCH] CVE-2024-56406: Heap-buffer-overflow with tr//
5
6This was due to underallocating needed space. If the translation forces
7something to become UTF-8 that is initially bytes, that UTF-8 could
8now require two bytes where previously a single one would do.
9
10(cherry picked from commit f93109c8a6950aafbd7488d98e112552033a3686)
11
12CVE: CVE-2024-56406
13Upstream-Status: Backport [https://github.com/Perl/perl5/commit/87f42aa0e0096e9a346c9672aa3a0bd3bef8c1dd]
14Signed-off-by: Peter Marko <peter.marko@siemens.com>
15---
16 op.c | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/op.c b/op.c
20index 69ff030e88..298b292633 100644
21--- a/op.c
22+++ b/op.c
23@@ -7515,6 +7515,7 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
24 * same time. But otherwise one crosses before the other */
25 if (t_cp < 256 && r_cp_end > 255 && r_cp != t_cp) {
26 can_force_utf8 = TRUE;
27+ max_expansion = MAX(2, max_expansion);
28 }
29 }
30
diff --git a/meta/recipes-devtools/perl/perl_5.34.3.bb b/meta/recipes-devtools/perl/perl_5.34.3.bb
index ed3518b62d..f6ebbf2d16 100644
--- a/meta/recipes-devtools/perl/perl_5.34.3.bb
+++ b/meta/recipes-devtools/perl/perl_5.34.3.bb
@@ -21,6 +21,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
21 file://CVE-2023-31484.patch \ 21 file://CVE-2023-31484.patch \
22 file://CVE-2023-31486-0001.patch \ 22 file://CVE-2023-31486-0001.patch \
23 file://CVE-2023-31486-0002.patch \ 23 file://CVE-2023-31486-0002.patch \
24 file://0001-CVE-2024-56406-Heap-buffer-overflow-with-tr.patch \
24 " 25 "
25SRC_URI:append:class-native = " \ 26SRC_URI:append:class-native = " \
26 file://perl-configpm-switch.patch \ 27 file://perl-configpm-switch.patch \