[SCM] Samba Shared Repository - branch master updated

Anoop C S anoopcs at samba.org
Thu Sep 11 19:07:01 UTC 2025


The branch, master has been updated
       via  51a1f3666e8 tdbtorture: Fix CID 1034815,1034816: protect from out-of-bounds access
      from  f4af0960a6e third_party: Bump version for socket_wrapper

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


- Log -----------------------------------------------------------------
commit 51a1f3666e827f4934ea158850b33c88efacbc2c
Author: Shachar Sharon <ssharon at redhat.com>
Date:   Mon Sep 8 08:19:23 2025 +0300

    tdbtorture: Fix CID 1034815,1034816: protect from out-of-bounds access
    
    A user may provide a non-valid input value for 'num_procs' (negative).
    Avoid potential out-of-bound access by forcing 'unsigned int' value
    (Coverity: OVERRUN).
    
    Signed-off-by: Shachar Sharon <ssharon at redhat.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Anoop C S <anoopcs at samba.org>
    
    Autobuild-User(master): Anoop C S <anoopcs at samba.org>
    Autobuild-Date(master): Thu Sep 11 19:06:16 UTC 2025 on atb-devel-224

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

Summary of changes:
 lib/tdb/tools/tdbtorture.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/tools/tdbtorture.c b/lib/tdb/tools/tdbtorture.c
index 14dc5e7a8d1..cf9fdfbbe10 100644
--- a/lib/tdb/tools/tdbtorture.c
+++ b/lib/tdb/tools/tdbtorture.c
@@ -314,7 +314,7 @@ int main(int argc, char * const *argv)
 {
 	int i, seed = -1;
 	int num_loops = 5000;
-	int num_procs = 3;
+	unsigned num_procs = 3;
 	int c, pfds[2];
 	extern char *optarg;
 	pid_t *pids;
@@ -327,7 +327,7 @@ int main(int argc, char * const *argv)
 	while ((c = getopt(argc, argv, "n:l:s:H:thkm")) != -1) {
 		switch (c) {
 		case 'n':
-			num_procs = strtol(optarg, NULL, 0);
+			num_procs = strtoul(optarg, NULL, 0);
 			break;
 		case 'l':
 			num_loops = strtol(optarg, NULL, 0);
@@ -364,7 +364,7 @@ int main(int argc, char * const *argv)
 		seed = (getpid() + time(NULL)) & 0x7FFFFFFF;
 	}
 
-	printf("Testing with %d processes, %d loops, %d hash_size, seed=%d%s\n",
+	printf("Testing with %u processes, %d loops, %d hash_size, seed=%d%s\n",
 	       num_procs, num_loops, hash_size, seed,
 	       (always_transaction ? " (all within transactions)" : ""));
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list