summaryrefslogtreecommitdiff
path: root/dev-libs/openssl/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-21 00:01:06 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-21 00:01:06 +0100
commitd33b3cf6cff9fdbfc8362bf854c3c34b2c28d518 (patch)
tree7fb87b3c81930bc74ab84958c42e07fde61f6b7f /dev-libs/openssl/files
parent1e2d947ea35b8fd5d14d55f60265f9763fa70a72 (diff)
gentoo auto-resync : 21:04:2023 - 00:01:05
Diffstat (limited to 'dev-libs/openssl/files')
-rw-r--r--dev-libs/openssl/files/openssl-3.0.8-CVE-2023-1255.patch40
-rw-r--r--dev-libs/openssl/files/openssl-3.1.0-CVE-2023-1255.patch40
2 files changed, 80 insertions, 0 deletions
diff --git a/dev-libs/openssl/files/openssl-3.0.8-CVE-2023-1255.patch b/dev-libs/openssl/files/openssl-3.0.8-CVE-2023-1255.patch
new file mode 100644
index 000000000000..9b1a657d51be
--- /dev/null
+++ b/dev-libs/openssl/files/openssl-3.0.8-CVE-2023-1255.patch
@@ -0,0 +1,40 @@
+commit 02ac9c9420275868472f33b01def01218742b8bb
+Author: Tomas Mraz <tomas@openssl.org>
+Date: Mon Apr 17 16:51:20 2023 +0200
+
+ aesv8-armx.pl: Avoid buffer overrread in AES-XTS decryption
+
+ Original author: Nevine Ebeid (Amazon)
+ Fixes: CVE-2023-1255
+
+ The buffer overread happens on decrypts of 4 mod 5 sizes.
+ Unless the memory just after the buffer is unmapped this is harmless.
+
+ Reviewed-by: Paul Dale <pauli@openssl.org>
+ Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
+ (Merged from https://github.com/openssl/openssl/pull/20759)
+
+ (cherry picked from commit 72dfe46550ee1f1bbfacd49f071419365bc23304)
+
+diff --git a/crypto/aes/asm/aesv8-armx.pl b/crypto/aes/asm/aesv8-armx.pl
+index 6a7bf05d1b..bd583e2c89 100755
+--- a/crypto/aes/asm/aesv8-armx.pl
++++ b/crypto/aes/asm/aesv8-armx.pl
+@@ -3353,7 +3353,7 @@ $code.=<<___ if ($flavour =~ /64/);
+ .align 4
+ .Lxts_dec_tail4x:
+ add $inp,$inp,#16
+- vld1.32 {$dat0},[$inp],#16
++ tst $tailcnt,#0xf
+ veor $tmp1,$dat1,$tmp0
+ vst1.8 {$tmp1},[$out],#16
+ veor $tmp2,$dat2,$tmp2
+@@ -3362,6 +3362,8 @@ $code.=<<___ if ($flavour =~ /64/);
+ veor $tmp4,$dat4,$tmp4
+ vst1.8 {$tmp3-$tmp4},[$out],#32
+
++ b.eq .Lxts_dec_abort
++ vld1.32 {$dat0},[$inp],#16
+ b .Lxts_done
+ .align 4
+ .Lxts_outer_dec_tail:
diff --git a/dev-libs/openssl/files/openssl-3.1.0-CVE-2023-1255.patch b/dev-libs/openssl/files/openssl-3.1.0-CVE-2023-1255.patch
new file mode 100644
index 000000000000..aea425f83556
--- /dev/null
+++ b/dev-libs/openssl/files/openssl-3.1.0-CVE-2023-1255.patch
@@ -0,0 +1,40 @@
+commit bc2f61ad70971869b242fc1cb445b98bad50074a
+Author: Tomas Mraz <tomas@openssl.org>
+Date: Mon Apr 17 16:51:20 2023 +0200
+
+ aesv8-armx.pl: Avoid buffer overrread in AES-XTS decryption
+
+ Original author: Nevine Ebeid (Amazon)
+ Fixes: CVE-2023-1255
+
+ The buffer overread happens on decrypts of 4 mod 5 sizes.
+ Unless the memory just after the buffer is unmapped this is harmless.
+
+ Reviewed-by: Paul Dale <pauli@openssl.org>
+ Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
+ (Merged from https://github.com/openssl/openssl/pull/20759)
+
+ (cherry picked from commit 72dfe46550ee1f1bbfacd49f071419365bc23304)
+
+diff --git a/crypto/aes/asm/aesv8-armx.pl b/crypto/aes/asm/aesv8-armx.pl
+index ea74217317..efd3ccd1a4 100755
+--- a/crypto/aes/asm/aesv8-armx.pl
++++ b/crypto/aes/asm/aesv8-armx.pl
+@@ -3367,7 +3367,7 @@ $code.=<<___ if ($flavour =~ /64/);
+ .align 4
+ .Lxts_dec_tail4x:
+ add $inp,$inp,#16
+- vld1.32 {$dat0},[$inp],#16
++ tst $tailcnt,#0xf
+ veor $tmp1,$dat1,$tmp0
+ vst1.8 {$tmp1},[$out],#16
+ veor $tmp2,$dat2,$tmp2
+@@ -3376,6 +3376,8 @@ $code.=<<___ if ($flavour =~ /64/);
+ veor $tmp4,$dat4,$tmp4
+ vst1.8 {$tmp3-$tmp4},[$out],#32
+
++ b.eq .Lxts_dec_abort
++ vld1.32 {$dat0},[$inp],#16
+ b .Lxts_done
+ .align 4
+ .Lxts_outer_dec_tail: