1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/librpc/ndr
Andreas Schneider d9e95849e3 librpc:ndr: Fix undefined behavior in ndr_basic
librpc/ndr/ndr_basic.c:723:2: runtime error: null pointer passed as
argument 2, which is declared to never be null

The following triggered the undefined behavior:

(gdb) bt
    at librpc/gen_ndr/ndr_drsuapi.c:2318
    fn=0x7ffff6e72983 <ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary>) at ../../librpc/ndr/ndr.c:1337
    at ../../source4/dsdb/schema/schema_syntax.c:2136
    drs_str=<optimized out>) at ../../source4/dsdb/schema/tests/schema_syntax.c:122
    already_setup=<optimized out>, restricted=restricted@entry=0x0) at ../../lib/torture/torture.c:442
    at ../../lib/torture/torture.c:507
    suite=0x5555563d9490, matched=0x7fffffffcef7) at ../../source4/torture/smbtorture.c:93
    matched=0x7fffffffcef7) at ../../source4/torture/smbtorture.c:95
    at ../../source4/torture/smbtorture.c:143
(gdb) f 1
1335            NDR_CHECK(ndr_push_bytes(ndr, blob.data, blob.length));
(gdb) p blob
$2 = {data = 0x0, length = 0}

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Thu Dec  6 08:48:28 CET 2018 on sn-devel-144
2018-12-06 08:48:27 +01:00
..
libndr.h librpc:ndr: Fix undefined behavior in ndr.c 2018-11-23 01:23:09 +01:00
ndr_auth.c
ndr_auth.h
ndr_backupkey.c librpc:ndr: Initialize inblob 2018-11-14 05:07:15 +01:00
ndr_backupkey.h
ndr_basic.c librpc:ndr: Fix undefined behavior in ndr_basic 2018-12-06 08:48:27 +01:00
ndr_bkupblobs.c
ndr_cab.c librpc:ndr: Add FALL_THROUGH statements in ndr_cab.c 2018-03-01 04:37:42 +01:00
ndr_cab.h librpc/ndr: remove unused ndr_cab_get_compression() function 2017-07-19 21:22:13 +02:00
ndr_compression.c Fix spelling s/ouput/output/ 2018-05-12 02:09:27 +02:00
ndr_compression.h librpc/ndr: add helper functions to setup and free compression states. 2017-07-19 21:22:13 +02:00
ndr_dcerpc.c dcerpc.idl: set LIBNDR_FLAG_* flags based on DCERPC_PFC_FLAG_OBJECT_UUID and DCERPC_DREP_LE 2016-10-26 11:20:18 +02:00
ndr_dcerpc.h
ndr_dns.c ndr_dns: fix pushing unknown resource records 2018-01-04 00:37:21 +01:00
ndr_dns.h
ndr_dnsp.c CVE-2016-2123: Fix DNS vuln ZDI-CAN-3995 2016-12-20 07:51:14 +01:00
ndr_dnsp.h CVE-2016-0771: librpc: add ndr_dnsp_string_list_copy() helper function 2016-03-10 06:52:23 +01:00
ndr_dnsserver.c
ndr_dnsserver.h
ndr_drsblobs.c drsblobs.idl: supplementalCredentialsSubBlob make it possible to parse strange blobs 2016-07-20 21:27:17 +02:00
ndr_drsblobs.h
ndr_drsuapi.c
ndr_drsuapi.h
ndr_frsrpc.c
ndr_frsrpc.h
ndr_ioctl.c
ndr_krb5pac.c krb5pac.idl: implement PAC_UPN_DNS_INFO correct 2016-07-20 21:27:18 +02:00
ndr_krb5pac.h krb5pac: no need for a noprint PAC_BUFFER. 2016-07-20 21:27:18 +02:00
ndr_misc.c ndr_misc: read syntax_id using strict util_str_hex functions 2018-05-31 01:57:16 +02:00
ndr_nbt.c librpc: Fix typos 2015-12-16 04:14:20 +01:00
ndr_nbt.h librpc: add decode_netlogon_samlogon_response_packet for mailslot debugging. 2016-07-01 01:29:42 +02:00
ndr_negoex.c negoex.idl: use DATA_BLOB for negoex_BYTE_VECTOR 2015-12-18 04:07:56 +01:00
ndr_negoex.h negoex.idl: initial version 2015-12-18 01:03:20 +01:00
ndr_netlogon.c
ndr_netlogon.h
ndr_ntlmssp.c librpc/ndr: add ndr_ntlmssp_find_av() helper function 2016-03-10 06:52:29 +01:00
ndr_ntlmssp.h librpc/ndr: add ndr_ntlmssp_find_av() helper function 2016-03-10 06:52:29 +01:00
ndr_ntprinting.c
ndr_ntprinting.h
ndr_orpc.c
ndr_preg.c
ndr_preg.h
ndr_rap.c
ndr_rap.h
ndr_schannel.c
ndr_schannel.h
ndr_sec_helper.c librpc: Use "all_zero" where appropriate 2017-01-03 16:04:28 +01:00
ndr_spoolss_buf.c spoolss: rename spoolss_EnumPrintProcDataTypes to spoolss_EnumPrintProcessorDataTypes 2016-09-22 12:29:26 +02:00
ndr_spoolss_buf.h spoolss: rename spoolss_EnumPrintProcDataTypes to spoolss_EnumPrintProcessorDataTypes 2016-09-22 12:29:26 +02:00
ndr_string.c ndr_string: Do overflow checks in ndr_push/pull_charset 2018-03-28 16:08:16 +02:00
ndr_svcctl.c
ndr_svcctl.h
ndr_table.c lib: rpc: The registered interfaces are a lists of singletons that are never removed. 2017-07-26 21:35:21 +02:00
ndr_table.h
ndr_witness.c librpc:ndr:witness: remove an unneeded block, reducing indentation. 2015-07-07 23:37:04 +02:00
ndr_witness.h witness: autogenerate the marshalling of the witness_notifyResponse_message. 2015-07-03 02:00:27 +02:00
ndr_wmi.c
ndr_wmi.h
ndr_xattr.c
ndr_xattr.h
ndr.c Use the rpc_parse debug class for PIDL genrated code 2017-09-07 06:56:27 +02:00
util.c
uuid.c ndr: Init variables of GUID_from_data_blob() 2018-10-19 23:11:26 +02:00