Files
poky/meta/recipes-devtools/perl/files/CVE-2026-57432-02.patch
Jaipaul Cheernam 68cfa8f4db perl: fix CVE-2026-57432
This patch applies the upstream fix as referenced in [1], using the
commits shown in [2] and [3].

[1] https://nvd.nist.gov/vuln/detail/CVE-2026-57432
[2] 5f7eb6bbbe
[3] 40754edc72

(From OE-Core rev: 93fbbdc19eea157c4c9b040291481c4f778ab6db)

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2026-09-04 10:39:10 +01:00

35 lines
1.1 KiB
Diff

From 40754edc72dd3e513d758153c0e2f0215897740e Mon Sep 17 00:00:00 2001
From: "Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk>
Date: Mon, 11 May 2026 12:25:33 +0100
Subject: [PATCH] pp_pack.c: Avoid some other potential overflows when
calculating sizes
CVE: CVE-2026-57432
Upstream-Status: Backport [https://github.com/Perl/perl5/commit/40754edc72dd3e513d758153c0e2f0215897740e]
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
pp_pack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pp_pack.c b/pp_pack.c
index 6075e83aac..b2019902203a 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -515,12 +515,12 @@ S_measure_struct(pTHX_ tempsym_t* symptr)
break;
case 'B':
case 'b':
- len = (len + 7)/8;
+ len = (len / 8) + !!(len % 8);
size = 1;
break;
case 'H':
case 'h':
- len = (len + 1)/2;
+ len = (len / 2) + !!(len % 2);
size = 1;
break;
--
2.43.0