The branch, master has been updated
       via  9cff0a0c114 ldb-samba: remove redundant negative check
       via  421486044f6 ldb-samba: avoid VLA in dsdb match dns tombstone
       via  56483a27994 ldb-samba: avoid leak in 
dsdb_match_for_dns_to_tombstone_time
      from  140007bfe17 s3:utils: The 'net ads keytab' commands should use 
machine credentials

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9cff0a0c1145714da1e2a961c36d5b45e781ed55
Author: Douglas Bagnall <[email protected]>
Date:   Sun Mar 21 20:49:32 2021 +1300

    ldb-samba: remove redundant negative check
    
    smb_strtoull() already checks for negative numbers, but does
    it properly, catching " -2" as well as "-2".
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Jeremy Allison <[email protected]>
    Autobuild-Date(master): Tue Mar 30 18:55:28 UTC 2021 on sn-devel-184

commit 421486044f6bd17bb66034c6097e23cfc3b6d054
Author: Douglas Bagnall <[email protected]>
Date:   Wed Mar 10 16:23:07 2021 +1300

    ldb-samba: avoid VLA in dsdb match dns tombstone
    
    We don't need it (only 64 bytes) and, well, they annoy people.
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 56483a2799430d36dcb9036b8a6f5eece959ba9f
Author: Douglas Bagnall <[email protected]>
Date:   Wed Mar 10 16:30:16 2021 +1300

    ldb-samba: avoid leak in dsdb_match_for_dns_to_tombstone_time
    
    After the first time through the loop, tmp_ctx has been freed and
    NULLed, so we end up allocating on NULL and never freeing.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14659
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 lib/ldb-samba/ldb_matching_rules.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb-samba/ldb_matching_rules.c 
b/lib/ldb-samba/ldb_matching_rules.c
index 26f4d4ed3b5..73d957df3d9 100644
--- a/lib/ldb-samba/ldb_matching_rules.c
+++ b/lib/ldb-samba/ldb_matching_rules.c
@@ -386,11 +386,11 @@ static int dsdb_match_for_dns_to_tombstone_time(struct 
ldb_context *ldb,
                return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
        } else {
                int error = 0;
-               char s[value_to_match->length+1];
+               char s[65];
 
                memcpy(s, value_to_match->data, value_to_match->length);
                s[value_to_match->length] = 0;
-               if (s[0] == '\0' || s[0] == '-') {
+               if (s[0] == '\0') {
                        DBG_ERR("Empty timestamp passed\n");
                        return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
                }
@@ -428,20 +428,20 @@ static int dsdb_match_for_dns_to_tombstone_time(struct 
ldb_context *ldb,
                }
 
                if (rec->wType == DNS_TYPE_SOA || rec->wType == DNS_TYPE_NS) {
-                       TALLOC_FREE(tmp_ctx);
+                       TALLOC_FREE(rec);
                        continue;
                }
 
                if (rec->wType == DNS_TYPE_TOMBSTONE) {
-                       TALLOC_FREE(tmp_ctx);
+                       TALLOC_FREE(rec);
                        continue;
                }
                if (rec->dwTimeStamp == 0) {
-                       TALLOC_FREE(tmp_ctx);
+                       TALLOC_FREE(rec);
                        continue;
                }
                if (rec->dwTimeStamp > tombstone_time) {
-                       TALLOC_FREE(tmp_ctx);
+                       TALLOC_FREE(rec);
                        continue;
                }
 


-- 
Samba Shared Repository

Reply via email to