Blame SOURCES/0000-CVE-2019-14824-BZ-1748199-deref-plugin-displays-rest.patch

458e05
From 63fa3ee665b66b36321489c090b24811838837c0 Mon Sep 17 00:00:00 2001
458e05
From: Mark Reynolds <mreynolds@redhat.com>
458e05
Date: Tue, 3 Sep 2019 13:15:45 -0400
458e05
Subject: [PATCH] CVE-2019-14824 (BZ#1748199) - deref plugin displays
458e05
 restricted attributes
458e05
458e05
Bug Description:  If there is an ACI that allows "search" access to an attribute,
458e05
                  the deref plugin access control checks sees this is a "read"
458e05
                  privilege and returns the attribute's value.
458e05
458e05
Fix description:  For deref plugin we are only concerned with "read" access, not
458e05
                  "search" access.  Removed the SLAPI_ACL_SEARCH right flag when
458e05
                  checking access for an attribute.
458e05
458e05
Reviewed by: lkrispen & tbordaz(Thanks!)
458e05
---
458e05
 ldap/servers/plugins/deref/deref.c | 6 +++---
458e05
 1 file changed, 3 insertions(+), 3 deletions(-)
458e05
458e05
diff --git a/ldap/servers/plugins/deref/deref.c b/ldap/servers/plugins/deref/deref.c
458e05
index cb5ebb830..ec1884ba3 100644
458e05
--- a/ldap/servers/plugins/deref/deref.c
458e05
+++ b/ldap/servers/plugins/deref/deref.c
458e05
@@ -573,7 +573,7 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const char *derefdn,
458e05
     Slapi_Entry **entries = NULL;
458e05
     int rc;
458e05
 
458e05
-    /*  If the access check on the attributes is done without retrieveing the entry
458e05
+    /*  If the access check on the attributes is done without retrieving the entry
458e05
  *  it cannot handle acis which need teh entry, eg to apply a targetfilter rule
458e05
  *  So the determination of attrs which can be dereferenced is delayed
458e05
  */
458e05
@@ -596,7 +596,7 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const char *derefdn,
458e05
                 int ii;
458e05
                 int needattrvals = 1; /* need attrvals sequence? */
458e05
                 if (deref_check_access(pb, entries[0], derefdn, attrs, &retattrs,
458e05
-                                       (SLAPI_ACL_SEARCH | SLAPI_ACL_READ))) {
458e05
+                                       SLAPI_ACL_READ)) {
458e05
                     slapi_log_err(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
458e05
                                   "deref_do_deref_attr - The client does not have permission to read the requested "
458e05
                                   "attributes in entry %s\n",
458e05
@@ -714,7 +714,7 @@ deref_pre_entry(Slapi_PBlock *pb)
458e05
         attrs[1] = NULL;
458e05
 
458e05
         if (deref_check_access(pb, ent, NULL, attrs, &retattrs,
458e05
-                               (SLAPI_ACL_SEARCH | SLAPI_ACL_READ))) {
458e05
+                               SLAPI_ACL_READ)) {
458e05
             slapi_log_err(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
458e05
                           "deref_pre_entry - The client does not have permission to read attribute %s in entry %s\n",
458e05
                           spec->derefattr, slapi_entry_get_dn_const(ent));
458e05
-- 
458e05
2.21.0
458e05