summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-extended/glusterfs/files/0001-dict-handle-negative-key-value-length-while-unserial.patch39
-rw-r--r--recipes-extended/glusterfs/glusterfs.inc1
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes-extended/glusterfs/files/0001-dict-handle-negative-key-value-length-while-unserial.patch b/recipes-extended/glusterfs/files/0001-dict-handle-negative-key-value-length-while-unserial.patch
new file mode 100644
index 0000000..cb3400b
--- /dev/null
+++ b/recipes-extended/glusterfs/files/0001-dict-handle-negative-key-value-length-while-unserial.patch
@@ -0,0 +1,39 @@
1From 428ee988df7d6cbe6e18becffcee5cdfb0fa9d17 Mon Sep 17 00:00:00 2001
2From: Amar Tumballi <amarts@redhat.com>
3Date: Tue, 24 Jul 2018 13:25:12 +0530
4Subject: [PATCH 1/7] dict: handle negative key/value length while unserialize
5
6Fixes: bz#1625089
7Change-Id: Ie56df0da46c242846a1ba51ccb9e011af118b119
8Signed-off-by: Amar Tumballi <amarts@redhat.com>
9
10Upstream-Status: Backport
11
12Fix CVE-2018-10911
13
14Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
15---
16 libglusterfs/src/dict.c | 7 +++++++
17 1 file changed, 7 insertions(+)
18
19diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c
20index 839b426..ac0a677 100644
21--- a/libglusterfs/src/dict.c
22+++ b/libglusterfs/src/dict.c
23@@ -2751,6 +2751,13 @@ dict_unserialize (char *orig_buf, int32_t size, dict_t **fill)
24 vallen = ntoh32 (hostord);
25 buf += DICT_DATA_HDR_VAL_LEN;
26
27+ if ((keylen < 0) || (vallen < 0)) {
28+ gf_msg_callingfn ("dict", GF_LOG_ERROR, 0,
29+ LG_MSG_UNDERSIZED_BUF,
30+ "undersized length passed "
31+ "key:%d val:%d", keylen, vallen);
32+ goto out;
33+ }
34 if ((buf + keylen) > (orig_buf + size)) {
35 gf_msg_callingfn ("dict", GF_LOG_ERROR, 0,
36 LG_MSG_UNDERSIZED_BUF,
37--
382.7.4
39
diff --git a/recipes-extended/glusterfs/glusterfs.inc b/recipes-extended/glusterfs/glusterfs.inc
index ab63a9a..ea5f2b7 100644
--- a/recipes-extended/glusterfs/glusterfs.inc
+++ b/recipes-extended/glusterfs/glusterfs.inc
@@ -23,6 +23,7 @@ SRC_URI += "file://glusterd.init \
23 file://0001-shared-storage-Prevent-mounting-shared-storage-from-.patch \ 23 file://0001-shared-storage-Prevent-mounting-shared-storage-from-.patch \
24 file://0002-server-auth-add-option-for-strict-authentication.patch \ 24 file://0002-server-auth-add-option-for-strict-authentication.patch \
25 file://0003-glusterfs-access-trusted-peer-group-via-remote-host-.patch \ 25 file://0003-glusterfs-access-trusted-peer-group-via-remote-host-.patch \
26 file://0001-dict-handle-negative-key-value-length-while-unserial.patch \
26 " 27 "
27 28
28LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0" 29LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0"