]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2023-0614 dsdb: Add DSDB_MARK_REQ_UNTRUSTED
authorAndrew Bartlett <abartlet@samba.org>
Thu, 2 Mar 2023 03:31:17 +0000 (16:31 +1300)
committerJule Anger <janger@samba.org>
Mon, 20 Mar 2023 09:03:38 +0000 (10:03 +0100)
This will allow our dsdb helper search functions to mark the new
request as untrusted, forcing read ACL evaluation (per current behaviour).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15270

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
[abartlet@samba.org adapted due to Samba 4.16 and lower
 not having the patches for CVE-2022-32743]

source4/dsdb/common/util.c
source4/dsdb/common/util.h

index 1436cd7bfecb0146265f5a237e2344dbcd527f66..c261aee3e599d1dbf58aeea96914681078a90f44 100644 (file)
@@ -4606,6 +4606,10 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
                }
        }
 
+       if (dsdb_flags & DSDB_MARK_REQ_UNTRUSTED) {
+               ldb_req_mark_untrusted(req);
+       }
+
        return LDB_SUCCESS;
 }
 
index e1854644d53cd03c22c578876df7f928920c3825..5bb96d60b3cca2208bdb3acdc125d08ea7bcf7a2 100644 (file)
@@ -43,6 +43,7 @@
 #define DSDB_MODIFY_PARTIAL_REPLICA          0x04000
 #define DSDB_PASSWORD_BYPASS_LAST_SET         0x08000
 #define DSDB_REPLMD_VANISH_LINKS              0x10000
+#define DSDB_MARK_REQ_UNTRUSTED               0x20000
 
 bool is_attr_in_list(const char * const * attrs, const char *attr);