Bug 8956 - crash during NTLM auth from WSGI script
Summary: crash during NTLM auth from WSGI script
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Python (show other bugs)
Version: 4.0 alpha 18
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jelmer Vernooij
QA Contact: samba4-qa@samba.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-24 20:07 UTC by Wolfgang Sourdeau (dead mail address)
Modified: 2022-01-05 16:58 UTC (History)
1 user (show)

See Also:


Attachments
The backtrace (bt full) (10.90 KB, text/plain)
2012-05-24 20:07 UTC, Wolfgang Sourdeau (dead mail address)
no flags Details
the wsgi script in question (13.45 KB, text/plain)
2012-05-24 20:08 UTC, Wolfgang Sourdeau (dead mail address)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Sourdeau (dead mail address) 2012-05-24 20:07:38 UTC
Created attachment 7594 [details]
The backtrace (bt full)

During my tests in writing my WSGI proxy for RPC-over-HTTP, a SEGFAULT occurs at some point (se attached backtrace) during NTLMSP authentication.

I am not sure it really pertains to the python bindings as this actually occurs within ldb-tdb.

Some more infos:

Script is run with mod_wsgi (and attached) and the code during which it occurs is located in the NTLMAuthHandler class (so RPC-over-HTTP is not relevant at all here). No other calls are made to the samba libraries besides the ones in that class. 

WSGI env follows:

[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1] [15524] {
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "CONTENT_LENGTH": "0",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "DOCUMENT_ROOT": "/var/www",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "GATEWAY_INTERFACE": "CGI/1.1",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "HTTP_ACCEPT": "application/rpc",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "HTTP_AUTHORIZATION": "NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "HTTP_CACHE_CONTROL": "no-cache",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "HTTP_CONNECTION": "Keep-Alive",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "HTTP_COOKIE": "OutlookSession=\\"{0E63DE43-2E21-4A73-92FF-84E79FBCE358}\\"",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "HTTP_HOST": "192.168.10.100",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "HTTP_PRAGMA": "SessionId=20948758-85b7-48af-b754-34504cad2674",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "HTTP_USER_AGENT": "MSRPC",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "PATH_INFO": "",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "QUERY_STRING": "wolfomachine.wolfomachine.local:6001",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "REMOTE_ADDR": "192.168.10.1",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "REMOTE_PORT": "57486",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "REQUEST_METHOD": "RPC_OUT_DATA",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "REQUEST_URI": "/rpc/rpcproxy.dll?wolfomachine.wolfomachine.local:6001",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SCRIPT_FILENAME": "/home/wsourdeau/src/openchange/mapiproxy/services/ocsmanager/rpcproxy.wsgi",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SCRIPT_NAME": "/rpc/rpcproxy.dll",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SERVER_ADDR": "192.168.10.100",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SERVER_ADMIN": "webmaster@localhost",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SERVER_NAME": "192.168.10.100",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SERVER_PORT": "80",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SERVER_PROTOCOL": "HTTP/1.1",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SERVER_SIGNATURE": "<address>Apache/2.2.22 (Debian) Server at 192.168.10.100 Port 80</address>\\n",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "SERVER_SOFTWARE": "Apache/2.2.22 (Debian)",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.application_group": "wolfomachine.local|/rpc/rpcproxy.dll",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.callable_object": "application",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.handler_script": "",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.input_chunked": "0",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.listener_host": "0.0.0.0",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.listener_port": "80",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.process_group": "",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.request_handler": "wsgi-script",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.script_reloading": "1",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "mod_wsgi.version": [
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]         3,
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]         3
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     ],
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "proxy-nokeepalive": "1",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "wsgi.errors": "<mod_wsgi.Log object at 0x555555d4e430>",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "wsgi.file_wrapper": "<built-in method file_wrapper of mod_wsgi.Adapter object at 0x555555cbf738>",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "wsgi.input": "<mod_wsgi.Input object at 0x555555d4e2f0>",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "wsgi.multiprocess": true,
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "wsgi.multithread": false,
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "wsgi.run_once": false,
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "wsgi.url_scheme": "http",
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     "wsgi.version": [
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]         1,
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]         1
[Thu May 24 15:57:27 2012] [error] [client 192.168.10.1]     ]

Username/password in use are "openchange/openchange" (if it matters at all)

My credit card number is... mmm nah, just kidding!
Comment 1 Wolfgang Sourdeau (dead mail address) 2012-05-24 20:08:53 UTC
Created attachment 7595 [details]
the wsgi script in question
Comment 2 Jelmer Vernooij 2012-09-24 17:23:18 UTC
Do you perhaps have a somewhat smaller test case to replicate this?
Comment 3 Björn Jacke 2022-01-05 16:58:00 UTC
no more feedback and quite old already, closing