The Samba-Bugzilla – Attachment 18265 Details for
Bug 15599
libgpo: Segfault in python bindings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.19
v4-19-fix-gpupdate-segfault.patch (text/plain), 3.85 KB, created by
Andreas Schneider
on 2024-03-12 13:11:22 UTC
(
hide
)
Description:
patch for 4.19
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2024-03-12 13:11:22 UTC
Size:
3.85 KB
patch
obsolete
>From 89f5654f63ba7ab292d77bf37ae6986770eb1da0 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Mon, 4 Mar 2024 16:42:38 +0100 >Subject: [PATCH 1/2] libgpo: Fix trailing spaces in pygpo.c > >Reviewed-by: David Mulder <dmulder@samba.org> >(cherry picked from commit 6fb86a0fa62d93c1c84c2000f01c381a9e8217e1) >--- > libgpo/pygpo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c >index adbd5b4688d..463d199599a 100644 >--- a/libgpo/pygpo.c >+++ b/libgpo/pygpo.c >@@ -371,7 +371,7 @@ static int py_ads_init(ADS *self, PyObject *args, PyObject *kwds) > workgroup, > ldap_server, > ADS_SASL_PLAIN); >- >+ > return 0; > } > >-- >2.44.0 > > >From 43f8ef3578ba5266f31440c105acb925eb0c928a Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Tue, 5 Mar 2024 13:17:19 +0100 >Subject: [PATCH 2/2] libgpo: Do not segfault if we don't have a valid security > descriptor > >Program received signal SIGSEGV, Segmentation fault. >ndr_push_security_descriptor (ndr=ndr@entry=0x555555bf41b0, ndr_flags=ndr_flags@entry=768, r=r@entry=0x0) at librpc/gen_ndr/ndr_security.c:713 >713 NDR_CHECK(ndr_push_security_descriptor_revision(ndr, NDR_SCALARS, r->revision)); > >Thread 1 (Thread 0x7ffff7ece740 (LWP 21460) "python3"): > #0 ndr_push_security_descriptor (ndr=ndr@entry=0x555555bf41b0, ndr_flags=ndr_flags@entry=768, r=r@entry=0x0) at librpc/gen_ndr/ndr_security.c:713 > _flags_save_STRUCT = 0 > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > _status = <optimized out> > __FUNCTION__ = "ndr_push_security_descriptor" > #1 0x00007ffff617237f in ndr_push_struct_blob (blob=blob@entry=0x7fffffffdb20, mem_ctx=0x555555aa3bd0, p=0x0, fn=0x7ffff6074ad0 <ndr_push_security_descriptor>, fn@entry=0x7ffff60706c8 <ndr_push_security_descriptor@plt>) at ../../librpc/ndr/ndr.c:1438 > _status = <optimized out> > ndr = 0x555555bf41b0 > #2 0x00007ffff607cccf in marshall_sec_desc (mem_ctx=<optimized out>, secdesc=<optimized out>, data=data@entry=0x7fffffffdb80, len=len@entry=0x7fffffffdb78) at ../../libcli/security/secdesc.c:241 > blob = {data = 0x7fffffffdb40 "`\333\377\377\377\177", length = 140737352374299} > ndr_err = <optimized out> > __FUNCTION__ = "marshall_sec_desc" > #3 0x00007ffff29edd94 in GPO_marshall_get_sec_desc_buf (self=<optimized out>, args=<optimized out>, kwds=<optimized out>) at ../../libgpo/pygpo.c:119 > gpo_ptr = <optimized out> > status = <optimized out> > data = 0x0 > len = 0 > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15599 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: David Mulder <dmulder@samba.org> >(cherry picked from commit b13d4359f2f16e391763d1dc6a5718def973fabb) >--- > libgpo/pygpo.c | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c >index 463d199599a..0f7116313f2 100644 >--- a/libgpo/pygpo.c >+++ b/libgpo/pygpo.c >@@ -116,6 +116,11 @@ static PyObject *GPO_marshall_get_sec_desc_buf(PyObject *self, PyObject *args, > uint8_t *data = NULL; > size_t len = 0; > >+ if (gpo_ptr->security_descriptor == NULL) { >+ PyErr_SetString(PyExc_RuntimeError, "Uninitialized"); >+ return NULL; >+ } >+ > status = marshall_sec_desc(gpo_ptr, gpo_ptr->security_descriptor, > &data, &len); > if (!NT_STATUS_IS_OK(status)) { >-- >2.44.0 >
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:
gd
:
review+
Actions:
View
Attachments on
bug 15599
:
18264
| 18265