GlobalProtect-openconnect icon indicating copy to clipboard operation
GlobalProtect-openconnect copied to clipboard

Segmentation fault on authentication failure

Open pensnarik opened this issue 4 years ago • 1 comments

I built the app from the source code on Arch Linux (kernel 5.11.2) and having an issue while trying to authenticate. It looks like the client expects XML response from VPN server but it doesn't work in my case:

2021-07-14 09:38:10.491 ERROR [131024] [GatewayAuthenticator::onLoginFinished@49] Failed to login the gateway at https://***/ssl-vpn/login.esp, Error transferring https://***/ssl-vpn/login.esp - server replied: Custom error
2021-07-14 09:38:10.491 INFO  [131024] [GatewayAuthenticator::doAuth@70] Perform the gateway prelogin at https://***/ssl-vpn/prelogin.esp?tmp=tmp&kerberos-support=yes&ipv6-support=yes&clientVer=4100&clientos=Linux
2021-07-14 09:38:10.638 INFO  [131024] [GatewayAuthenticator::onPreloginFinished@87] Gateway prelogin succeeded.
2021-07-14 09:38:10.638 INFO  [131024] [PreloginResponse::parse@26] Start parsing the prelogin response...
2021-07-14 09:38:10.639 INFO  [131024] [GatewayAuthenticator::normalAuth@105] Trying to perform the normal login with Username / Password credentials
2021-07-14 09:38:13.692 INFO  [131024] [GatewayAuthenticator::onPerformNormalLogin@123] Start to perform normal login...
2021-07-14 09:38:13.693 INFO  [131024] [GatewayAuthenticator::login@38] Trying to login the gateway at https://***/ssl-vpn/login.esp with prot=https%3A&server=&inputSrc=&jnlpReady=jnlpReady&computer=zhidenkov&ok=Login&direct=yes&clientVer=4100&os-version=Arch Linux&clientos=Linux&portal-userauthcookie=&portal-prelogonuserauthcookie=&prelogin-cookie=&ipv6-support=yes&user=123&passwd=123
2021-07-14 09:38:14.358 INFO  [131024] [gpclient::helper::parseGatewayResponse@50] Start parsing the gateway response...
2021-07-14 09:38:14.359 INFO  [131024] [gpclient::helper::parseGatewayResponse@51] The gateway response is: 
var respStatus = "Error";
var respMsg = "Authentication failure: Invalid username or password";
thisForm.inputStr.value = "";


--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "gpclient" received signal SIGSEGV, Segmentation fault.
0x00007fffee48c922 in QUrlQuery::addQueryItem(QString const&, QString const&) () from /usr/lib/libQt5Core.so.5

Stack trace:

(gdb) bt
#0  0x00007fffee48c922 in QUrlQuery::addQueryItem(QString const&, QString const&) () at /usr/lib/libQt5Core.so.5
#1  0x00005555555791c5 in gpclient::helper::parseGatewayResponse(QByteArray const&) (xml=...) at gphelper.cpp:64
#2  0x0000555555572a16 in GatewayAuthenticator::onLoginFinished() (this=0x555555de4190) at gatewayauthenticator.cpp:64
#3  0x00007fffee5703bb in  () at /usr/lib/libQt5Core.so.5
#4  0x00007fffee9ae4c5 in  () at /usr/lib/libQt5Network.so.5
#5  0x00007fffee56615f in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#6  0x00007fffef833d62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#7  0x00007fffee53900a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#8  0x00007fffee53c109 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#9  0x00007fffee592604 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007fffeb36202c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#11 0x00007fffeb3b5b59 in  () at /usr/lib/libglib-2.0.so.0
#12 0x00007fffeb35f781 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#13 0x00007fffee591c36 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#14 0x00007fffee53797c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#15 0x00007fffee53fee4 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#16 0x0000555555568961 in main(int, char**) (argc=<optimized out>, argv=0x7fffffffe4d8) at main.cpp:38

pensnarik avatar Jul 14 '21 06:07 pensnarik

It's a duplicate of #38, but I don't have the account to reproduce it locally.

yuezk avatar Jul 18 '21 12:07 yuezk