The Samba-Bugzilla – Attachment 17708 Details for
Bug 15267
Crash during share enumeration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.17.next, 4.16.next.
0001-s3-params-lp_do_section-protect-against-NULL-deref.patch (text/plain), 1.48 KB, created by
Jeremy Allison
on 2022-12-20 19:14:56 UTC
(
hide
)
Description:
git-am fix for 4.17.next, 4.16.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2022-12-20 19:14:56 UTC
Size:
1.48 KB
patch
obsolete
>From 9cb6029f1c3650460539d5bced28caffbd21c549 Mon Sep 17 00:00:00 2001 >From: Andrew Walker <awalker@ixsystems.com> >Date: Mon, 19 Dec 2022 08:17:47 -0500 >Subject: [PATCH] s3:params:lp_do_section - protect against NULL deref > >iServiceIndex may indicate an empty slot in the ServicePtrs >array. In this case, lpcfg_serivce_ok(ServicePtrs[iServiceIndex]) >may trigger a NULL deref and crash. Skipping the check >here will cause a scan of the array in add_a_service() and the >NULL slot will be used safely. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15267 > >Signed-off-by: Andrew Walker <awalker@ixsystems.com> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Tue Dec 20 18:49:54 UTC 2022 on sn-devel-184 > >(cherry picked from commit 5b19288949e97a5af742ff2719992d56f21e364a) >--- > source3/param/loadparm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c >index 7e20acbf8b9..0ebdd315bd1 100644 >--- a/source3/param/loadparm.c >+++ b/source3/param/loadparm.c >@@ -2887,7 +2887,7 @@ bool lp_do_section(const char *pszSectionName, void *userdata) > /* if we have a current service, tidy it up before moving on */ > bRetval = true; > >- if (iServiceIndex >= 0) >+ if ((iServiceIndex >= 0) && (ServicePtrs[iServiceIndex] != NULL)) > bRetval = lpcfg_service_ok(ServicePtrs[iServiceIndex]); > > /* if all is still well, move to the next record in the services array */ >-- >2.34.1 >
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?
(
awalker
)
slow
:
review+
asn
:
review+
Actions:
View
Attachments on
bug 15267
: 17708