summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/openldap
diff options
context:
space:
mode:
authorfan.xin <fan.xin@jp.fujitsu.com>2017-06-09 14:45:49 +0900
committerMartin Jansa <Martin.Jansa@gmail.com>2017-06-14 14:51:15 +0200
commit990b2ecf2c041d615ad0d07bd28a9ca77d0b2521 (patch)
treefb8164233bcc6c57917111fed959f4a414b51cf0 /meta-oe/recipes-support/openldap
parent69b4796d191af025771c4032bb3e3bce04b27986 (diff)
downloadmeta-openembedded-990b2ecf2c041d615ad0d07bd28a9ca77d0b2521.tar.gz
openldap: Fix CVE-2017-9287
servers/slapd/back-mdb/search.c in OpenLDAP through 2.4.44 is prone to a double free vulnerability. A user with access to search the directory can crash slapd by issuing a search including the Paged Results control with a page size of 0. Patch reference: http://www.openldap.org/its/?findid=8655 Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/openldap')
-rw-r--r--meta-oe/recipes-support/openldap/openldap/openldap-CVE-2017-9287.patch30
-rw-r--r--meta-oe/recipes-support/openldap/openldap_2.4.44.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap/openldap-CVE-2017-9287.patch b/meta-oe/recipes-support/openldap/openldap/openldap-CVE-2017-9287.patch
new file mode 100644
index 000000000..93e9243ee
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap/openldap-CVE-2017-9287.patch
@@ -0,0 +1,30 @@
1From e0e65f309dc0eb5582387acf1b2c2b5b3955f6b6 Mon Sep 17 00:00:00 2001
2From: Ryan Tandy <ryan@nardis.ca>
3Date: Wed, 17 May 2017 20:07:39 -0700
4Subject: [PATCH] Fix double free of search base with page size 0
5
6CVE: CVE-2017-9287
7Upstream-Status: Submitted
8
9Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
10---
11 servers/slapd/back-mdb/search.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
13
14diff --git a/servers/slapd/back-mdb/search.c b/servers/slapd/back-mdb/search.c
15index 009939d..d0db918 100644
16--- a/servers/slapd/back-mdb/search.c
17+++ b/servers/slapd/back-mdb/search.c
18@@ -1066,7 +1066,8 @@ notfound:
19 /* check size limit */
20 if ( get_pagedresults(op) > SLAP_CONTROL_IGNORED ) {
21 if ( rs->sr_nentries >= ((PagedResultsState *)op->o_pagedresults_state)->ps_size ) {
22- mdb_entry_return( op, e );
23+ if (e != base)
24+ mdb_entry_return( op, e );
25 e = NULL;
26 send_paged_response( op, rs, &lastid, tentries );
27 goto done;
28--
292.1.4
30
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.44.bb b/meta-oe/recipes-support/openldap/openldap_2.4.44.bb
index 4b7ed3597..2d3cfc0d0 100644
--- a/meta-oe/recipes-support/openldap/openldap_2.4.44.bb
+++ b/meta-oe/recipes-support/openldap/openldap_2.4.44.bb
@@ -25,6 +25,7 @@ SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${BP}.tgz \
25 file://slapd.service \ 25 file://slapd.service \
26 file://thread_stub.patch \ 26 file://thread_stub.patch \
27 file://openldap-CVE-2015-3276.patch \ 27 file://openldap-CVE-2015-3276.patch \
28 file://openldap-CVE-2017-9287.patch \
28" 29"
29 30
30SRC_URI[md5sum] = "693ac26de86231f8dcae2b4e9d768e51" 31SRC_URI[md5sum] = "693ac26de86231f8dcae2b4e9d768e51"