Bug 14359 - RPC handles cannot be differentiated in source3 RPC server
Summary: RPC handles cannot be differentiated in source3 RPC server
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DCE-RPCs and pipes (show other bugs)
Version: 4.10.6
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-29 06:31 UTC by Alexander Bokovoy
Modified: 2020-05-05 07:12 UTC (History)
1 user (show)

See Also:


Attachments
patch for v4.12 branch (15.41 KB, patch)
2020-04-29 07:41 UTC, Alexander Bokovoy
no flags Details
patch for v4.11 branch (15.32 KB, patch)
2020-04-29 07:42 UTC, Alexander Bokovoy
no flags Details
patch for v4.11 branch v2 (15.31 KB, patch)
2020-04-29 09:16 UTC, Alexander Bokovoy
asn: review+
Details
patch for v4.12 branch v2 (15.40 KB, patch)
2020-04-29 09:17 UTC, Alexander Bokovoy
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Bokovoy 2020-04-29 06:31:48 UTC
Various RPC services expect policy handles of a specific type.

s3 RPC server does not allow to create policy handles with a specific type while actually requiring that policy handle type itself in some places.

We need to make sure to specify the policy on-wire handle type when creating the policy handle. The change should follow s4 DCE RPC server implementation.

The original logic to always set on-wire handle type to 0 can be tracked
down to commit fdeea341 when we didn't really know about differences in on-wire handle types.

All but LSA trusted domain RPC calls do not check the on-wire handle
type in s3 RPC server.
Comment 1 Alexander Bokovoy 2020-04-29 06:32:39 UTC
Merged in master as c7a4578d
Comment 2 Alexander Bokovoy 2020-04-29 07:41:50 UTC
Created attachment 15943 [details]
patch for v4.12 branch
Comment 3 Alexander Bokovoy 2020-04-29 07:42:27 UTC
Created attachment 15944 [details]
patch for v4.11 branch
Comment 4 Alexander Bokovoy 2020-04-29 09:16:45 UTC
Created attachment 15945 [details]
patch for v4.11 branch v2

Updated to include a fix from https://gitlab.com/samba-team/samba/-/merge_requests/1307
Comment 5 Alexander Bokovoy 2020-04-29 09:17:17 UTC
Created attachment 15946 [details]
patch for v4.12 branch v2

Update to include the fix from https://gitlab.com/samba-team/samba/-/merge_requests/1307
Comment 6 Louis 2020-04-29 12:31:51 UTC
(In reply to Alexander Bokovoy from comment #4)

Hai, 

building these against 4.11.8 on debian shows :

dwz: debian/samba-libs/usr/lib/x86_64-linux-gnu/libdcerpc-samr.so.0.0.1: .debug_info section not present
dwz: debian/samba-testsuite/usr/bin/smbtorture: DWARF compression not beneficial - old size 6586162 new size 6586425
dwz: debian/python3-samba/usr/lib/python3/dist-packages/samba/dcerpc/dnsserver.cpython-37m-x86_64-linux-gnu.so: DWARF compression not beneficial - old size 547921 new size 551460
dwz: debian/python3-samba/usr/lib/python3/dist-packages/samba/dcerpc/lsa.cpython-37m-x86_64-linux-gnu.so: DWARF compression not beneficial - old size 724633 new size 729326
dwz: debian/python3-samba/usr/lib/python3/dist-packages/samba/dcerpc/samr.cpython-37m-x86_64-linux-gnu.so: DWARF compression not beneficial - old size 781576 new size 787860
dwz: debian/python3-samba/usr/lib/python3/dist-packages/samba/dcerpc/spoolss.cpython-37m-x86_64-linux-gnu.so: DWARF compression not beneficial - old size 1646075 new size 1669714
dwz: debian/python3-samba/usr/lib/python3/dist-packages/samba/dcerpc/srvsvc.cpython-37m-x86_64-linux-gnu.so: DWARF compression not beneficial - old size 847220 new size 856289
dwz: debian/python3-samba/usr/lib/python3/dist-packages/samba/dcerpc/wkssvc.cpython-37m-x86_64-linux-gnu.so: DWARF compression not beneficial - old size 501435 new size 502245
dwz: debian/libwbclient0/usr/lib/x86_64-linux-gnu/samba/libaesni-intel.so.0: .debug_info section not present
dwz: debian/libwbclient0/usr/lib/x86_64-linux-gnu/libsamba-util.so.0.0.1: DWARF compression not beneficial - old size 217989 new size 222095


Can I ignore these? 
if someone want the full build log, let me know. 

Greetz,
Louis
Comment 7 Louis 2020-04-29 12:32:44 UTC
Note, just checked the 4.12.2 build with this one, same as the 4.11.
Comment 8 Alexander Bokovoy 2020-04-29 12:56:11 UTC
Louis,

the DWZ messages are specific to Debian build, it attempts to compress debug information sections in shared libraries and simply tells that it is not worth doing so. They can safely be ignored.

The other two messages are again from DWZ that it wasn't able to find debug information sections in those two shared libraries. AES-NI library doesn't have them, it is written in assembler. As for libdcerpc-samr, I'm not sure why it has no debug information in the shared library.

In any way, these are unrelated to the patches.
Comment 9 Andreas Schneider 2020-04-29 14:53:09 UTC
Karolin, please apply the patches to the relevant branches. Thanks!
Comment 10 Karolin Seeger 2020-05-04 09:12:43 UTC
(In reply to Andreas Schneider from comment #9)
Pushed to autobuild-v4-{12,11}-test.
Comment 11 Karolin Seeger 2020-05-05 07:12:31 UTC
Pushed to both branches.
Closing out bug number.

Thanks!