Bug 15599 - libgpo: Segfault in python bindings
Summary: libgpo: Segfault in python bindings
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Python (show other bugs)
Version: 4.19.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-05 12:24 UTC by Andreas Schneider
Modified: 2024-04-08 07:34 UTC (History)
1 user (show)

See Also:


Attachments
patch for 4.20 (3.85 KB, patch)
2024-03-12 13:09 UTC, Andreas Schneider
gd: review+
Details
patch for 4.19 (3.85 KB, patch)
2024-03-12 13:11 UTC, Andreas Schneider
gd: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2024-03-05 12:24:23 UTC
A user reported that samba-gpupdate segfaults with:

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
Comment 1 Samba QA Contact 2024-03-06 15:45:03 UTC
This bug was referenced in samba master:

b13d4359f2f16e391763d1dc6a5718def973fabb
Comment 2 Andreas Schneider 2024-03-12 13:09:31 UTC
Created attachment 18264 [details]
patch for 4.20
Comment 3 Andreas Schneider 2024-03-12 13:11:22 UTC
Created attachment 18265 [details]
patch for 4.19
Comment 4 Guenther Deschner 2024-03-13 16:33:30 UTC
Comment on attachment 18265 [details]
patch for 4.19

LGTM
Comment 5 Guenther Deschner 2024-03-13 16:34:00 UTC
Jule, please add to v4.19 and v4.20, thanks!
Comment 6 Jule Anger 2024-03-15 09:17:14 UTC
Pushed to autobuild-v4-{20,19}-test.
Comment 7 Samba QA Contact 2024-03-15 10:30:03 UTC
This bug was referenced in samba v4-20-test:

69b69bb2085dfc842292db14eadbcba71b096d69
Comment 8 Samba QA Contact 2024-03-15 11:21:03 UTC
This bug was referenced in samba v4-19-test:

a58338ec926d4979253b86fcc273be66e708adbd
Comment 9 Jule Anger 2024-03-15 12:35:43 UTC
Closing out bug report.

Thanks!
Comment 10 Samba QA Contact 2024-03-27 17:13:24 UTC
This bug was referenced in samba v4-20-stable (Release samba-4.20.0):

69b69bb2085dfc842292db14eadbcba71b096d69
Comment 11 Samba QA Contact 2024-04-08 07:34:28 UTC
This bug was referenced in samba v4-19-stable (Release samba-4.19.6):

a58338ec926d4979253b86fcc273be66e708adbd