Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.94k stars 167 forks source link

pam authentication module `undefined symbol: misc_conv` #3672

Closed rmadrid24 closed 1 year ago

rmadrid24 commented 1 year ago

I am running an xpra server instance, which I access through the html5 client. When I enable pam authentication with options tcp-auth=pam and auth=pam, the html5 client fails to authenticate the user and disconnects the session.

The server shows the following error log:

> 2022-10-26 16:32:30,840 Authentication required by PAM authenticator module
> 2022-10-26 16:32:30,840  sending challenge using 'xor' digest over tcp connection
> 2022-10-26 16:32:30,840 sending challenge "password for user 'exouser'"
> 2022-10-26 16:32:30,865 processing authentication with (PAM,), remaining=(PAM,), digest_modes=('hmac', 'hmac+md5', 'xor', 'keycloak', 'hmac+md5', 'hmac+sha256', 'hmac+sha1', 'hmac+sha512', '
> hmac+sha384', 'hmac+sha512/256', 'hmac+sha512/224'), salt_digest_modes=('hmac', 'hmac+md5', 'xor', 'keycloak', 'hmac+md5', 'hmac+sha256', 'hmac+sha1', 'hmac+sha512', 'hmac+sha384', 'hmac+sha
> 512/256', 'hmac+sha512/224')
> 2022-10-26 16:32:30,865 authenticator[0]=PAM, requires-challenge=True, challenge-sent=True
> 2022-10-26 16:32:30,865 combined salt(58a88dc0b34815ee8bfa4aceebce27b658a436ac101cd71e5f50bcd8f1c7fe65d9ce28c0cb0dd70c2d3738d6236106dfc4bc673b028c4b3eb1e09fd07292b6ec, bb44355f652e20d1001df4
> e6efaed871fc850c7eeb2acf3d2808ee70964c99c7)=34316463366435646632333063373939303964313334363133333530366461316337313063306562336338616630633666666331613661356663356664613232623631376136386235
> 32653130373036613064383265303666656234316532623137366533643431373266333565613334646265663637633837376432656336
> 2022-10-26 16:32:30,866 authenticate_check(***********************************************************************, '»D5_e. Ñ\x00\x1dôæï®Øqü\x85\x0c~ë*Ï=(\x08îp\x96L\x99Ç') response salt='41
> dc6d5df230c79909d1346133506da1c710c0eb3c8af0c6ffc1a6a5fc5fda22b617a68b52e10706a0d82e06feb41e2b176e3d4172f35ea34dbef67c877d2ec6'
> 2022-10-26 16:32:30,866 pam.check(..) pw=pwd.struct_passwd(pw_name='exouser', pw_passwd='x', pw_uid=1001, pw_gid=1001, pw_gecos='', pw_dir='/home/exouser', pw_shell='/bin/bash')
> 2022-10-26 16:32:30,866 pam check(exouser, [..])
> 2022-10-26 16:32:30,866 check(..)
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/xpra/server/auth/sys_auth_base.py", line 172, in authenticate_check
>     ret = self.check(password)
>   File "/usr/lib/python3/dist-packages/xpra/server/auth/pam_auth.py", line 49, in check
>     return check(self.username, password, self.service, self.check_account)
>   File "/usr/lib/python3/dist-packages/xpra/server/auth/pam_auth.py", line 20, in check
>     from xpra.server.pam import pam_session #@UnresolvedImport pylint: disable=import-outside-toplevel
> ImportError: /usr/lib/python3/dist-packages/xpra/server/pam.cpython-38-x86_64-linux-gnu.so: undefined symbol: misc_conv
> 2022-10-26 16:32:30,867 Error: PAM authentication check failed:
> 2022-10-26 16:32:30,867  /usr/lib/python3/dist-packages/xpra/server/pam.cpython-38-x86_64-linux-gnu.so: undefined symbol: misc_conv
> 2022-10-26 16:32:30,867 Warning: authentication failed
> 2022-10-26 16:32:30,867  authentication failed

System Information

rmadrid24 commented 1 year ago

I was able to fix pam authentication by setting the env variable LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libpam_misc.so.

I'm closing this bug since this issue might be related to my setup and not the xpra server.

totaam commented 1 year ago

I believe that this is a real bug, probably fixed in b3f5a2c1b0a78af1d714f379b675477b9151f835.

totaam commented 1 year ago

Also, this would not be related to the html5 client and could be reproduced with the default client.