The Samba-Bugzilla – Attachment 18552 Details for
Bug 15798
libnet4: seg fault after dc lookup failure
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v4.22 fix cherry-picked from master
fix-bug-15798.patch (text/plain), 2.78 KB, created by
Björn Baumbach
on 2025-02-11 15:02:14 UTC
(
hide
)
Description:
v4.22 fix cherry-picked from master
Filename:
MIME Type:
Creator:
Björn Baumbach
Created:
2025-02-11 15:02:14 UTC
Size:
2.78 KB
patch
obsolete
>From ba1d04c76cc79cf7798f1f5a2a3bdecbf88ddcdd Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= <bb@sernet.de> >Date: Fri, 7 Feb 2025 12:03:18 +0100 >Subject: [PATCH 1/2] libnet4: check return value of DC lookup >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Avoids possible segmentation fault when the lookup fails. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15798 > >Pair-programmed-with: Volker Lendecke <vl@samba.org> >Signed-off-by: Volker Lendecke <vl@samba.org> >Signed-off-by: Björn Baumbach <bb@sernet.de> >Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> > >Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> >Autobuild-Date(master): Sat Feb 8 03:30:27 UTC 2025 on atb-devel-224 > >(cherry picked from commit c5511056708fb1be3c2e1b2ad61af6643f92051c) >--- > source4/libnet/libnet_lookup.c | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c >index f8477c7258c..26cf26fe3e1 100644 >--- a/source4/libnet/libnet_lookup.c >+++ b/source4/libnet/libnet_lookup.c >@@ -223,6 +223,9 @@ NTSTATUS libnet_LookupDCs_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, > NTSTATUS status; > struct finddcs finddcs_io; > status = finddcs_cldap_recv(req, mem_ctx, &finddcs_io); >+ if (!NT_STATUS_IS_OK(status)) { >+ return status; >+ } > talloc_free(req); > io->out.num_dcs = 1; > io->out.dcs = talloc(mem_ctx, struct nbt_dc_name); >-- >2.34.1 > > >From 26488a8e5fea2ce56d15b04416d55fd3130d564a Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= <bb@sernet.de> >Date: Mon, 10 Feb 2025 17:42:12 +0100 >Subject: [PATCH 2/2] libnet4: free tevent request even on error >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15798 > >Signed-off-by: Björn Baumbach <bb@sernet.de> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Björn Baumbach <bb@sernet.de> >Autobuild-Date(master): Tue Feb 11 11:05:37 UTC 2025 on atb-devel-224 > >(cherry picked from commit 8f72b5673e6a26c5a6a69dbc56e91027d0dabe37) >--- > source4/libnet/libnet_lookup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c >index 26cf26fe3e1..fe021b9f4d8 100644 >--- a/source4/libnet/libnet_lookup.c >+++ b/source4/libnet/libnet_lookup.c >@@ -223,10 +223,10 @@ NTSTATUS libnet_LookupDCs_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, > NTSTATUS status; > struct finddcs finddcs_io; > status = finddcs_cldap_recv(req, mem_ctx, &finddcs_io); >+ talloc_free(req); > if (!NT_STATUS_IS_OK(status)) { > return status; > } >- talloc_free(req); > io->out.num_dcs = 1; > io->out.dcs = talloc(mem_ctx, struct nbt_dc_name); > NT_STATUS_HAVE_NO_MEMORY(io->out.dcs); >-- >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:
vl
:
review+
Actions:
View
Attachments on
bug 15798
: 18552