summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch42
-rw-r--r--meta-oe/recipes-extended/redis/redis_6.2.2.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch b/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch
new file mode 100644
index 0000000000..ebbf6e1b94
--- /dev/null
+++ b/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch
@@ -0,0 +1,42 @@
1From 29900d4e6bccdf3691bedf0ea9a5d84863fa3592 Mon Sep 17 00:00:00 2001
2From: Oran Agra <oran@redislabs.com>
3Date: Mon, 3 May 2021 08:27:22 +0300
4Subject: [PATCH] Fix integer overflow in intset (CVE-2021-29478)
5
6An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and
7potentially result with remote code execution.
8
9The vulnerability involves changing the default set-max-intset-entries
10configuration value, creating a large set key that consists of integer values
11and using the COPY command to duplicate it.
12
13The integer overflow bug exists in all versions of Redis starting with 2.6,
14where it could result with a corrupted RDB or DUMP payload, but not exploited
15through COPY (which did not exist before 6.2).
16
17CVE: CVE-2021-29478
18Upstream-Status: Backport
19[https://github.com/redis/redis/commit/29900d4e6bccdf3691bedf0ea9a5d84863fa3592]
20
21Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
22
23---
24 src/intset.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/src/intset.c b/src/intset.c
28index 1a64ecae8..9ba13898d 100644
29--- a/src/intset.c
30+++ b/src/intset.c
31@@ -281,7 +281,7 @@ uint32_t intsetLen(const intset *is) {
32
33 /* Return intset blob size in bytes. */
34 size_t intsetBlobLen(intset *is) {
35- return sizeof(intset)+intrev32ifbe(is->length)*intrev32ifbe(is->encoding);
36+ return sizeof(intset)+(size_t)intrev32ifbe(is->length)*intrev32ifbe(is->encoding);
37 }
38
39 /* Validate the integrity of the data structure.
40--
412.32.0
42
diff --git a/meta-oe/recipes-extended/redis/redis_6.2.2.bb b/meta-oe/recipes-extended/redis/redis_6.2.2.bb
index e89bb50f15..a36c190af3 100644
--- a/meta-oe/recipes-extended/redis/redis_6.2.2.bb
+++ b/meta-oe/recipes-extended/redis/redis_6.2.2.bb
@@ -17,6 +17,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \
17 file://GNU_SOURCE.patch \ 17 file://GNU_SOURCE.patch \
18 file://0006-Define-correct-gregs-for-RISCV32.patch \ 18 file://0006-Define-correct-gregs-for-RISCV32.patch \
19 file://fix-CVE-2021-29477.patch \ 19 file://fix-CVE-2021-29477.patch \
20 file://fix-CVE-2021-29478.patch \
20 " 21 "
21SRC_URI[sha256sum] = "7a260bb74860f1b88c3d5942bf8ba60ca59f121c6dce42d3017bed6add0b9535" 22SRC_URI[sha256sum] = "7a260bb74860f1b88c3d5942bf8ba60ca59f121c6dce42d3017bed6add0b9535"
22 23