1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

pytests/segfaults: dcerpc ref elements segfault

These are just a couple of examples.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
Douglas Bagnall 2019-10-29 12:02:04 +13:00 committed by Noel Power
parent 4dd725b1b5
commit 272e20adbb
2 changed files with 15 additions and 1 deletions

View File

@ -25,7 +25,7 @@ import sys
from samba.net import Net, LIBNET_JOIN_AUTOMATIC
from samba.credentials import DONT_USE_KERBEROS
from samba import NTSTATUSError, ntstatus
from samba.dcerpc import misc, drsuapi
from samba.dcerpc import misc, drsuapi, samr, unixinfo
from samba import auth, gensec
from samba.samdb import SamDB
from samba import netbios
@ -157,3 +157,15 @@ class SegfaultTests(samba.tests.TestCase):
def test_rpcecho(self):
from dcerpc import echo
echo.rpcecho("")
@segfault_detector
def test_dcerpc_idl_ref_elements(self):
"""There are many pidl generated functions that crashed on this
pattern, where a NULL pointer was created rather than an empty
structure."""
samr.Connect5().out_info_out = 1
@segfault_detector
def test_dcerpc_idl_unixinfo_elements(self):
"""Dereferencing is sufficient to crash"""
unixinfo.GetPWUid().out_infos

View File

@ -1 +1,3 @@
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__3
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_dcerpc_idl_ref_elements
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_dcerpc_idl_unixinfo_elements