1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/libgpo
Andreas Schneider 69b69bb208 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 b13d4359f2)

Autobuild-User(v4-20-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-20-test): Fri Mar 15 10:29:54 UTC 2024 on atb-devel-224
2024-03-15 10:29:54 +00:00
..
admx libgpo: fix wrong lineending in admx files 2023-11-27 01:12:40 +00:00
gpext s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
gpo_fetch.c libgpo: Remove unused code 2020-05-26 11:22:07 +00:00
gpo_filesync.c libgpo: Fix code spelling 2023-09-11 02:42:41 +00:00
gpo_ini.c libgpo: Remove unnecessary cast 2023-09-14 21:35:28 +00:00
gpo_ini.h libgpo: apply some const. 2017-01-06 12:28:19 +01:00
gpo_ldap.c libgpo: parse_gp_ext: do not crash upon no ext_strings 2020-01-13 22:25:38 +00:00
gpo_proto.h gpo: Add python libgpo bindings 2017-11-20 21:41:14 +01:00
gpo_reg.c libgpo: Reimplmeent registry_create_system_token() using get_system_token() 2023-09-26 23:45:36 +00:00
gpo_sec.c libgpo: Use dom_sid_str_buf 2018-11-09 22:42:29 +01:00
gpo_util.c s3-lib: Modify merge_nt_token() into a GPO-specifc merge with SYSTEM 2023-09-26 23:45:36 +00:00
gpo.h libgpo: Remove unused code 2020-05-26 11:22:07 +00:00
pygpo.c libgpo: Do not segfault if we don't have a valid security descriptor 2024-03-15 10:29:54 +00:00
wscript_build libgpo: only install group policy admx files when building as DC 2020-06-30 07:51:48 +00:00