Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ksmbd-tools for openSUSE:Factory 
checked in at 2023-04-10 20:16:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ksmbd-tools (Old)
 and      /work/SRC/openSUSE:Factory/.ksmbd-tools.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ksmbd-tools"

Mon Apr 10 20:16:50 2023 rev:2 rq:1078179 version:3.4.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/ksmbd-tools/ksmbd-tools.changes  2023-03-21 
17:44:54.378799400 +0100
+++ /work/SRC/openSUSE:Factory/.ksmbd-tools.new.19717/ksmbd-tools.changes       
2023-04-10 20:16:51.568915600 +0200
@@ -1,0 +2,7 @@
+Sun Apr  9 19:49:53 UTC 2023 - David Disseldorp <[email protected]>
+
+- Update to version 3.4.8:
+  * Fix memleaks.
+  * Fix two security issues that were reported by ZDI.
+
+-------------------------------------------------------------------

Old:
----
  3.4.7.tar.gz

New:
----
  3.4.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ksmbd-tools.spec ++++++
--- /var/tmp/diff_new_pack.mLYk3o/_old  2023-04-10 20:16:52.988923899 +0200
+++ /var/tmp/diff_new_pack.mLYk3o/_new  2023-04-10 20:16:52.992923923 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ksmbd-tools
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -11,28 +11,28 @@
 # case the license is the MIT License). An "Open Source License" is a
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
-#
+
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 Name:           ksmbd-tools
-Version:        3.4.7
+Version:        3.4.8
 Release:        0
 Summary:        ksmbd kernel server userspace utilities
 License:        GPL-2.0-or-later
 Group:          System/Filesystems
-Url:            https://github.com/cifsd-team/ksmbd-tools
+URL:            https://github.com/cifsd-team/ksmbd-tools
 Source:         
https://github.com/cifsd-team/ksmbd-tools/archive/refs/tags/%{version}.tar.gz
 
 # ksmbd kernel module was only added in kernel 5.15
 BuildRequires:  kernel-default >= 5.15
-BuildRequires:  glib2-devel
-BuildRequires:  libnl3-devel
 BuildRequires:  autoconf
 BuildRequires:  automake
+BuildRequires:  glib2-devel
+BuildRequires:  libnl3-devel
 BuildRequires: libtool
-
-Requires(pre): kernel-default >= 5.15
+Requires:       kmod(ksmbd.ko)
 
 %description
 Set of utilities for creating and managing SMB3 shares for the ksmbd kernel

++++++ 3.4.7.tar.gz -> 3.4.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksmbd-tools-3.4.7/include/version.h 
new/ksmbd-tools-3.4.8/include/version.h
--- old/ksmbd-tools-3.4.7/include/version.h     2023-01-31 14:43:47.000000000 
+0100
+++ new/ksmbd-tools-3.4.8/include/version.h     2023-04-08 11:16:10.000000000 
+0200
@@ -5,6 +5,6 @@
 
 #ifndef _VERSION_H
 
-#define KSMBD_TOOLS_VERSION "3.4.7"
+#define KSMBD_TOOLS_VERSION "3.4.8"
 
 #endif /* !_VERSION_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksmbd-tools-3.4.7/mountd/rpc_lsarpc.c 
new/ksmbd-tools-3.4.8/mountd/rpc_lsarpc.c
--- old/ksmbd-tools-3.4.7/mountd/rpc_lsarpc.c   2023-01-31 14:43:47.000000000 
+0100
+++ new/ksmbd-tools-3.4.8/mountd/rpc_lsarpc.c   2023-04-08 11:16:10.000000000 
+0200
@@ -701,6 +701,18 @@
        return lsarpc_invoke(pipe);
 }
 
+static void free_ph_entry(gpointer k, gpointer s, gpointer user_data)
+{
+       g_free(s);
+}
+
+static void lsarpc_ph_clear_table(void)
+{
+       g_rw_lock_writer_lock(&ph_table_lock);
+       g_hash_table_foreach(ph_table, free_ph_entry, NULL);
+       g_rw_lock_writer_unlock(&ph_table_lock);
+}
+
 int rpc_lsarpc_init(void)
 {
        char domain_string[NAME_MAX];
@@ -724,6 +736,7 @@
 {
        g_free(domain_name);
        if (ph_table) {
+               lsarpc_ph_clear_table();
                g_hash_table_destroy(ph_table);
                ph_table = NULL;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksmbd-tools-3.4.7/mountd/rpc_samr.c 
new/ksmbd-tools-3.4.8/mountd/rpc_samr.c
--- old/ksmbd-tools-3.4.7/mountd/rpc_samr.c     2023-01-31 14:43:47.000000000 
+0100
+++ new/ksmbd-tools-3.4.8/mountd/rpc_samr.c     2023-04-08 11:16:10.000000000 
+0200
@@ -425,7 +425,7 @@
        if (gethostname(hostname, NAME_MAX))
                return KSMBD_RPC_ENOMEM;
 
-       home_dir_len = 2 + strlen(hostname) + 1 + strlen(ch->user->name);
+       home_dir_len = 2 + strlen(hostname) + 1 + strlen(ch->user->name) + 1;
 
        home_dir = g_try_malloc0(home_dir_len);
        if (!home_dir)
@@ -731,6 +731,9 @@
        if (!ch)
                return KSMBD_RPC_EBAD_FID;
 
+       if (!ch->user)
+               return KSMBD_RPC_EBAD_FID;
+
        curr_offset = dce->offset;
        dce->offset += 16;
        if (build_sec_desc(dce, &sec_desc_len, ch->user->uid))
@@ -1049,9 +1052,22 @@
        return 0;
 }
 
+static void free_ch_entry(gpointer k, gpointer s, gpointer user_data)
+{
+       g_free(s);
+}
+
+static void samr_ch_clear_table(void)
+{
+       g_rw_lock_writer_lock(&ch_table_lock);
+       g_hash_table_foreach(ch_table, free_ch_entry, NULL);
+       g_rw_lock_writer_unlock(&ch_table_lock);
+}
+
 void rpc_samr_destroy(void)
 {
        if (ch_table) {
+               samr_ch_clear_table();
                g_hash_table_destroy(ch_table);
                ch_table = NULL;
        }

Reply via email to