The Samba-Bugzilla – Attachment 11590 Details for
Bug 11597
backport some valgrind fixes from upstream master to 4.2 / 4.3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patches backported to 4.3.1
valgrind-4.3.1.patch (text/plain), 6.19 KB, created by
Noel Power
on 2015-11-10 17:33:54 UTC
(
hide
)
Description:
patches backported to 4.3.1
Filename:
MIME Type:
Creator:
Noel Power
Created:
2015-11-10 17:33:54 UTC
Size:
6.19 KB
patch
obsolete
>From 247b9b46cdbea2d72ebdaf7a7bc331b4e32c166c Mon Sep 17 00:00:00 2001 >From: Noel Power <noel.power@suse.com> >Date: Thu, 29 Oct 2015 11:11:00 +0000 >Subject: [PATCH 1/5] remove many valgrind errors for base.lock test > >mostly "Conditional jump or move depends on uninitialised value" & >"Use of uninitialised value of size 8" errors, suspect this is >related to compiler padding for the struct > >Signed-off-by: Noel Power <noel.power@suse.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Fri Nov 6 00:16:53 CET 2015 on sn-devel-104 > >(cherry picked from commit ce8068e70b11a3ce5634c56f43a035713c5ea2ed) >--- > source3/locking/brlock.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c >index 05e7ee2..e8c8d89 100644 >--- a/source3/locking/brlock.c >+++ b/source3/locking/brlock.c >@@ -1021,6 +1021,8 @@ NTSTATUS brl_lock(struct messaging_context *msg_ctx, > NTSTATUS ret; > struct lock_struct lock; > >+ ZERO_STRUCT(lock); >+ > #if !ZERO_ZERO > if (start == 0 && size == 0) { > DEBUG(0,("client sent 0/0 lock - please report this\n")); >-- >2.1.4 > > >From 158ce2c6083764120642638e47380be706a8644e Mon Sep 17 00:00:00 2001 >From: Noel Power <noel.power@suse.com> >Date: Wed, 28 Oct 2015 21:17:42 +0000 >Subject: [PATCH 2/5] fix uninitialised read in process_host_announce > >Signed-off-by: Noel Power <noel.power@suse.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 7ade51901381507beaeac92e9b0d2f0d424123a9) >--- > source3/nmbd/nmbd_incomingdgrams.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c >index 9a69252..6fedcfd 100644 >--- a/source3/nmbd/nmbd_incomingdgrams.c >+++ b/source3/nmbd/nmbd_incomingdgrams.c >@@ -105,6 +105,8 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p > struct server_record *servrec; > unstring work_name; > unstring source_name; >+ ZERO_STRUCT(source_name); >+ ZERO_STRUCT(announce_name); > > pull_ascii_fstring(comment, buf+31); > >-- >2.1.4 > > >From 657fd2e14a23872b6f8587a4fc5c0589f8f92c6c Mon Sep 17 00:00:00 2001 >From: Noel Power <noel.power@suse.com> >Date: Wed, 28 Oct 2015 19:53:49 +0000 >Subject: [PATCH 3/5] fix writev(vector[...]) points to uninitialised bytes in > call_trans2findnext > >Signed-off-by: Noel Power <noel.power@suse.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 17482d52160acc869af9f7a2029d5b595d33a12d) >--- > source3/smbd/trans2.c | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 8816402..8b91b5a 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -2986,6 +2986,11 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd > pdata = *ppdata; > data_end = pdata + max_data_bytes + DIR_ENTRY_SAFETY_MARGIN - 1; > >+ /* >+ * squash valgrind "writev(vector[...]) points to uninitialised byte(s)" >+ * error. >+ */ >+ memset(pdata + total_data, 0, (max_data_bytes + DIR_ENTRY_SAFETY_MARGIN) - total_data); > /* Realloc the params space */ > *pparams = (char *)SMB_REALLOC(*pparams, 6*SIZEOFWORD); > if(*pparams == NULL ) { >-- >2.1.4 > > >From 14b18603fa3c7f3bda81fcd7c874001691e0fb18 Mon Sep 17 00:00:00 2001 >From: Noel Power <noel.power@suse.com> >Date: Wed, 28 Oct 2015 17:08:28 +0000 >Subject: [PATCH 4/5] fix 'Invalid read of size 1' in reply_search > >Signed-off-by: Noel Power <noel.power@suse.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 0f2f8a4f772ff22d00a9e87dafa97a431af8f6da) >--- > source3/smbd/reply.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c >index b1b91e1..9aad632 100644 >--- a/source3/smbd/reply.c >+++ b/source3/smbd/reply.c >@@ -1607,7 +1607,7 @@ void reply_search(struct smb_request *req) > { > connection_struct *conn = req->conn; > char *path = NULL; >- const char *mask = NULL; >+ char *mask = NULL; > char *directory = NULL; > struct smb_filename *smb_fname = NULL; > char *fname = NULL; >@@ -1688,11 +1688,11 @@ void reply_search(struct smb_request *req) > > p = strrchr_m(directory,'/'); > if ((p != NULL) && (*directory != '/')) { >- mask = p + 1; >+ mask = talloc_strdup(ctx, p + 1); > directory = talloc_strndup(ctx, directory, > PTR_DIFF(p, directory)); > } else { >- mask = directory; >+ mask = talloc_strdup(ctx, directory); > directory = talloc_strdup(ctx,"."); > } > >@@ -1741,7 +1741,7 @@ void reply_search(struct smb_request *req) > goto out; > } > >- mask = dptr_wcard(sconn, dptr_num); >+ mask = talloc_strdup(ctx, dptr_wcard(sconn, dptr_num)); > if (!mask) { > goto SearchEmpty; > } >@@ -1880,6 +1880,7 @@ void reply_search(struct smb_request *req) > maxentries )); > out: > TALLOC_FREE(directory); >+ TALLOC_FREE(mask); > TALLOC_FREE(smb_fname); > END_PROFILE(SMBsearch); > return; >-- >2.1.4 > > >From e51cfed13f9d83cfa01f2cab361caa3c80639c19 Mon Sep 17 00:00:00 2001 >From: Noel Power <noel.power@suse.com> >Date: Wed, 28 Oct 2015 15:42:06 +0000 >Subject: [PATCH 5/5] fix writev(vector[...]) points to uninitialised bytes in > call_trans2findfirst > >Signed-off-by: Noel Power <noel.power@suse.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 9b2aba1b7aa7386dfc64bcefafa83374b6525354) >--- > source3/smbd/trans2.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 8b91b5a..d5a38d4 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -2639,7 +2639,11 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd > } > pdata = *ppdata; > data_end = pdata + max_data_bytes + DIR_ENTRY_SAFETY_MARGIN - 1; >- >+ /* >+ * squash valgrind "writev(vector[...]) points to uninitialised byte(s)" >+ * error. >+ */ >+ memset(pdata + total_data, 0, ((max_data_bytes + DIR_ENTRY_SAFETY_MARGIN) - total_data)); > /* Realloc the params space */ > *pparams = (char *)SMB_REALLOC(*pparams, 10); > if (*pparams == NULL) { >-- >2.1.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
ddiss
:
review+
Actions:
View
Attachments on
bug 11597
: 11590 |
11591