[PATCH] Fix pam_conv in pam_wrapper

Andreas Schneider asn at samba.org
Fri Sep 21 17:08:18 UTC 2018

On Friday, 21 September 2018 18:30:19 CEST Ralph Böhme via samba-technical 
> On Fri, Sep 21, 2018 at 11:11:17AM +0200, Andreas Schneider wrote:
> >I have a patchset for pam_wrapper to fix the pam conversation and add
> >support for running with Address Sanitizer.
> >
> >
> >However, the pam_conv fix is important that I can update pam_wrapper to add
> >tests for some pam_winbind features:
> >
> >https://git.samba.org/?p=asn/samba.git;a=shortlog;h=refs/heads/master-pwrap
> generally looks good, but can you explain the rationale behind the deep-bind
> patch in the last patch?

AddressSanitizer detects that we want to do a DEEPBIND so make sure we bind 
with libc an nothing else can interfere.

==28489==You are trying to dlopen a libc.so.10 shared library with 
RTLD_DEEPBIND flag which is incompatibe with sanitizer runtime (see https://
github.com/google/sanitizers/issues/611 for details). If you want to run 
libc.so.10 library under sanitizers please remove RTLD_DEEPBIND from dlopen 

However that's exactly what AddressSanitizer wants to do and in order to get 
it working we need to remove the flag. Then you need to preload it before 
socket_wrapper, like this:


This means if socket_wrapper looks for symbols it will bind those from 
libasan.so.5 instead of the libc.so.


Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D

More information about the samba-technical mailing list