Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#64666 - PAM Authentication failed with abnormal exit status code 139

Attached to Project: Arch Linux
Opened by Nabil Bourenane (Guy Cpario) - Wednesday, 27 November 2019, 13:20 GMT
Task Type Bug Report
Category Packages: Core
Status Unconfirmed
Assigned To No-one
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description:
Whenever I start the vboxweb service, GUI crashes infinitely, phpVirtualbox can't authenticates through PAM.

Additional info:
* package version(s)
- Linux automation 5.3.13-arch1-1 #1 SMP PREEMPT Sun, 24 Nov 2019 10:15:50 +0000 x86_64 GNU/Linux
- virtualbox-6.0.14-3
- virtualbox-host-modules-arch 6.0.14-9
- phpvirtualbox 5.2_1-1
- nginx-1.16.1-1
- pam-1.3.1-2
- pambase 20190105.1-2

* config and/or log files etc.
% sudo journalctl -xeu vboxweb
Nov 27 12:04:13 automation vboxwebsrv[188455]: pam_unix(login:auth): unix_chkpwd abnormal exit: 139
Nov 27 12:04:13 automation vboxwebsrv[188455]: pam_unix(login:auth): unix_chkpwd abnormal exit: 139
Nov 27 12:04:13 automation vboxwebsrv[188455]: pam_unix(login:auth): authentication failure; logname= uid=1001 euid=1001 tty= ruser= rhost= user=vbox

Probably due to this commit:
https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/pam&id=5340fb9f7d4e6a496fa402ae0adb97852b7772b7

Steps to reproduce:
Install virtualbox, phpVirtualBox and nginx, run vboxweb.service with a dedicated user following the wiki: https://wiki.archlinux.org/index.php/PhpVirtualBox.

% sudo systemctl start vboxweb
GUI crashes and prints "pam_unix(login:auth): unix_chkpwd abnormal exit: 139" in logs.

With current PAM version, it fails:
- pam-1.3.1-2
- pambase 20190105.1-2

Downgrade PAM to previous release and it works:
- pam-1.3.1-1
- pambase-20190105.1-1
This task depends upon

Comment by Christian Hesse (eworm) - Wednesday, 27 November 2019, 13:35 GMT
Exit code 139 is caused by SIGSEGV, so anything crashed with segmentation fault.
Comment by Nabil Bourenane (Guy Cpario) - Wednesday, 27 November 2019, 14:46 GMT
You're right, I didn't gather this information.

% dmesg
[67148.200827] audit: type=1100 audit(1574851912.484:1535): pid=212362 uid=1001 auid=4294967295 ses=4294967295 msg='op=PAM:unix_chkpwd acct="vbox" exe="/usr/bin/unix_chkpwd" hostname=? addr=? terminal=? res=success'
[67148.331636] SQW01[212365]: segfault at 7fdee2b6d110 ip 00007fdee2b6d110 sp 00007fdee2d8c758 error 15
[67148.331641] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[67148.331746] audit: type=1701 audit(1574851912.617:1536): auid=4294967295 uid=1001 gid=1001 ses=4294967295 pid=212365 comm="SQW01" exe="/usr/lib/virtualbox/vboxwebsrv" sig=11 res=1
[67148.352970] audit: type=1130 audit(1574851912.637:1537): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@91-212366-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[67154.171817] show_signal_msg: 13 callbacks suppressed

I'm actually confused and don't know if I should rollback pam or virtualbox, I can't test actually, I'll bring more information later.
Comment by Nabil Bourenane (Guy Cpario) - Thursday, 28 November 2019, 11:36 GMT
Hello,

I tried with virtualbox-6.0.14-1:
[50634.000278] VBoxSVCWatcher[48961]: segfault at 7ff8c8427110 ip 00007ff8c8427110 sp 00007ff8c869c7a8 error 14
[50634.000285] Code: Bad RIP value.
[50634.000389] audit: type=1701 audit(1574938913.789:1332): auid=4294967295 uid=1001 gid=1001 ses=4294967295 pid=48961 comm="VBoxSVCWatcher" exe="/usr/lib/virtualbox/vboxwebsrv" sig=11 res=1

I then tried with virtualbox-6.0.14-4:
[51695.258327] SQW05[69041]: segfault at 7fd5a9851110 ip 00007fd5a9851110 sp 00007fd5a95a8758 error 15
[51695.258332] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[51695.258460] audit: type=1701 audit(1574939975.097:1883): auid=4294967295 uid=1001 gid=1001 ses=4294967295 pid=69041 comm="SQW05" exe="/usr/lib/virtualbox/vboxwebsrv" sig=11 res=1

To resume, with pam-1.3.1-2 and pambase 20190105.1-2, recent versions of virtualbox (6.0.14-[1|3|4]) result into a segfault when vboxwebsrv tries to authenticate to PAM.

The workaround is to downgrade to pam-1.3.1-1 and pambase-20190105.1-1.

I can't status if it's virtualbox fault or pam but recent versions are not complient to each other.
Comment by Christian Hesse (eworm) - Thursday, 28 November 2019, 16:23 GMT
Well, pam 1.3.1-2 and pambase 20190105.1-2 are just rebuilds... (I guess pambase does not change the game, as it does not contain executable files.)
Possibly related to the toolchain (glibc, gcc, ...) at build time?

Loading...