summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorVivek Kumbhar <vkumbhar@mvista.com>2024-01-10 17:08:40 +0530
committerSteve Sakoman <steve@sakoman.com>2024-01-21 08:50:38 -1000
commitf96bd47ea29321e55904463706d392490640ca0e (patch)
tree8b965ac813866b8ef4612aca88cb87c16bea7fee /meta/recipes-connectivity
parenta818202d85a2fba1be8f43e00391e44a2dbada7e (diff)
downloadpoky-f96bd47ea29321e55904463706d392490640ca0e.tar.gz
openssl: Backport fix for CVE-2023-6129
Upstream-Status: Backport [https://github.com/openssl/openssl/commit/8d847a3ffd4f0b17ee33962cf69c36224925b34f] (From OE-Core rev: db1c8b434e1e249cf5a12fe39cf996373513f3dc) Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/CVE-2023-6129.patch113
-rw-r--r--meta/recipes-connectivity/openssl/openssl_3.0.12.bb1
2 files changed, 114 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/CVE-2023-6129.patch b/meta/recipes-connectivity/openssl/openssl/CVE-2023-6129.patch
new file mode 100644
index 0000000000..c5749e1874
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/CVE-2023-6129.patch
@@ -0,0 +1,113 @@
1From 8d847a3ffd4f0b17ee33962cf69c36224925b34f Mon Sep 17 00:00:00 2001
2From: Rohan McLure <rmclure@linux.ibm.com>
3Date: Thu, 4 Jan 2024 10:25:50 +0100
4Subject: [PATCH] poly1305-ppc.pl: Fix vector register clobbering
5
6Fixes CVE-2023-6129
7
8The POLY1305 MAC (message authentication code) implementation in OpenSSL for
9PowerPC CPUs saves the the contents of vector registers in different order
10than they are restored. Thus the contents of some of these vector registers
11is corrupted when returning to the caller. The vulnerable code is used only
12on newer PowerPC processors supporting the PowerISA 2.07 instructions.
13
14Reviewed-by: Matt Caswell <matt@openssl.org>
15Reviewed-by: Richard Levitte <levitte@openssl.org>
16Reviewed-by: Tomas Mraz <tomas@openssl.org>
17(Merged from https://github.com/openssl/openssl/pull/23200)
18
19Upstream-Status: Backport [https://github.com/openssl/openssl/commit/8d847a3ffd4f0b17ee33962cf69c36224925b34f]
20CVE: CVE-2023-6129
21Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
22---
23 crypto/poly1305/asm/poly1305-ppc.pl | 42 ++++++++++++++---------------
24 1 file changed, 21 insertions(+), 21 deletions(-)
25
26diff --git a/crypto/poly1305/asm/poly1305-ppc.pl b/crypto/poly1305/asm/poly1305-ppc.pl
27index 9f86134..2e601bb 100755
28--- a/crypto/poly1305/asm/poly1305-ppc.pl
29+++ b/crypto/poly1305/asm/poly1305-ppc.pl
30@@ -744,7 +744,7 @@ ___
31 my $LOCALS= 6*$SIZE_T;
32 my $VSXFRAME = $LOCALS + 6*$SIZE_T;
33 $VSXFRAME += 128; # local variables
34- $VSXFRAME += 13*16; # v20-v31 offload
35+ $VSXFRAME += 12*16; # v20-v31 offload
36
37 my $BIG_ENDIAN = ($flavour !~ /le/) ? 4 : 0;
38
39@@ -919,12 +919,12 @@ __poly1305_blocks_vsx:
40 addi r11,r11,32
41 stvx v22,r10,$sp
42 addi r10,r10,32
43- stvx v23,r10,$sp
44- addi r10,r10,32
45- stvx v24,r11,$sp
46+ stvx v23,r11,$sp
47 addi r11,r11,32
48- stvx v25,r10,$sp
49+ stvx v24,r10,$sp
50 addi r10,r10,32
51+ stvx v25,r11,$sp
52+ addi r11,r11,32
53 stvx v26,r10,$sp
54 addi r10,r10,32
55 stvx v27,r11,$sp
56@@ -1153,12 +1153,12 @@ __poly1305_blocks_vsx:
57 addi r11,r11,32
58 stvx v22,r10,$sp
59 addi r10,r10,32
60- stvx v23,r10,$sp
61- addi r10,r10,32
62- stvx v24,r11,$sp
63+ stvx v23,r11,$sp
64 addi r11,r11,32
65- stvx v25,r10,$sp
66+ stvx v24,r10,$sp
67 addi r10,r10,32
68+ stvx v25,r11,$sp
69+ addi r11,r11,32
70 stvx v26,r10,$sp
71 addi r10,r10,32
72 stvx v27,r11,$sp
73@@ -1899,26 +1899,26 @@ Ldone_vsx:
74 mtspr 256,r12 # restore vrsave
75 lvx v20,r10,$sp
76 addi r10,r10,32
77- lvx v21,r10,$sp
78- addi r10,r10,32
79- lvx v22,r11,$sp
80+ lvx v21,r11,$sp
81 addi r11,r11,32
82- lvx v23,r10,$sp
83+ lvx v22,r10,$sp
84 addi r10,r10,32
85- lvx v24,r11,$sp
86+ lvx v23,r11,$sp
87 addi r11,r11,32
88- lvx v25,r10,$sp
89+ lvx v24,r10,$sp
90 addi r10,r10,32
91- lvx v26,r11,$sp
92+ lvx v25,r11,$sp
93 addi r11,r11,32
94- lvx v27,r10,$sp
95+ lvx v26,r10,$sp
96 addi r10,r10,32
97- lvx v28,r11,$sp
98+ lvx v27,r11,$sp
99 addi r11,r11,32
100- lvx v29,r10,$sp
101+ lvx v28,r10,$sp
102 addi r10,r10,32
103- lvx v30,r11,$sp
104- lvx v31,r10,$sp
105+ lvx v29,r11,$sp
106+ addi r11,r11,32
107+ lvx v30,r10,$sp
108+ lvx v31,r11,$sp
109 $POP r27,`$VSXFRAME-$SIZE_T*5`($sp)
110 $POP r28,`$VSXFRAME-$SIZE_T*4`($sp)
111 $POP r29,`$VSXFRAME-$SIZE_T*3`($sp)
112--
1132.39.3
diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.12.bb b/meta/recipes-connectivity/openssl/openssl_3.0.12.bb
index 395cace2ec..4602151d91 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.0.12.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.0.12.bb
@@ -13,6 +13,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
13 file://afalg.patch \ 13 file://afalg.patch \
14 file://0001-Configure-do-not-tweak-mips-cflags.patch \ 14 file://0001-Configure-do-not-tweak-mips-cflags.patch \
15 file://CVE-2023-5678.patch \ 15 file://CVE-2023-5678.patch \
16 file://CVE-2023-6129.patch \
16 " 17 "
17 18
18SRC_URI:append:class-nativesdk = " \ 19SRC_URI:append:class-nativesdk = " \