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#27920 - [gnome-settings-daemon] smartcard plugin segmentation fault

Attached to Project: Arch Linux
Opened by James (n_K) - Thursday, 12 January 2012, 23:13 GMT
Last edited by Allan McRae (Allan) - Saturday, 02 June 2012, 13:17 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ionut Biru (wonder)
Architecture i686
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Enabled a system to login via smartcard using pam_pkcs11, compiling from the latest version's source code on a Gnome-GUI arch linux PC, got everything set up with PAM working but upon loggin in with a smartcard, only the desktop background appears for about 10 seconds, then the rest of the desktop loads in a very basic fashion, kernel.log indicates a segfault in gnome-settings-daemon:
Jan 12 22:57:33 localhost kernel: [ 2502.245260] gnome-settings-[19105]: segfault at 110 ip b3995e5f sp b377e120 error 4 in libnss3.so[b3940000+13c000]
Jan 12 22:57:40 localhost kernel: [ 2509.515277] gnome-settings-[19111]: segfault at 110 ip b391de5f sp b370b120 error 4 in libnss3.so[b38c8000+13c000]

Upon running /usr/lib/gnome-settings-daemon/gnome-settings-daemon with --debug, the following snip'd output is displayed:

(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: GsdSmartcardPlugin initializing
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: initializing smartcard manager
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: GsdSmartcardPlugin Activating smartcard plugin
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: attempting to load NSS database '/etc/pki/nssdb'
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: NSS database sucessfully loaded
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: attempting to load driver...
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: Getting list of suitable modules
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: loading smartcard driver using spec 'library="/usr/lib/pkcs11/libcoolkeypk11.so"'
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: smartcard manager started
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: GsdSmartcardPlugin processing smartcard removal immediately user logged in with smartcard and it's not inserted
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: GsdSmartcardPlugin processing smartcard removal
** (gnome-settings-daemon:19106): DEBUG: GnomeSettingsManager: emitting plugin-activated smartcard
** (gnome-settings-daemon:19106): DEBUG: Plugin smartcard: active
** (gnome-settings-daemon:19106): DEBUG: GnomeSettingsModule 0x87db340 initialising
** (gnome-settings-daemon:19106): DEBUG: Loading /usr/lib/gnome-settings-daemon-3.0/libkeybindings.so
** (gnome-settings-daemon:19106): DEBUG: Creating object of type GsdKeybindingsPlugin
(gnome-settings-daemon:19106): keybindings-plugin-DEBUG: GsdKeybindingsPlugin initializing
(gnome-settings-daemon:19106): keybindings-plugin-DEBUG: Activating keybindings plugin
(gnome-settings-daemon:19106): keybindings-plugin-DEBUG: Starting keybindings manager
(gnome-settings-daemon:19106): smartcard-plugin-DEBUG: waiting for card event
Segmentation fault

Removing the smartcard module from loading stops the segfault, as does logging in with a password.

Additional info:
* package version(s):
gnome-settings-daemon-3.2.2-1
pam-1.1.5-2
pcsclite-1.8.1-3
opensc-0.12.1 (Not using 12.3 or 12.3 pre-released as a bug exists in it asking for a code to be entered even when a pinpad isn't present and the configuration is set to not use once http://www.opensc-project.org/opensc/ticket/402)
pam_pkcs11-0.6.7
libp11-0.2.8
engine_pkcs11-0.1.8

* config and/or log files etc.:
Using this in PAM configurations to allow smartcard login:
auth sufficient /usr/local/lib/security/pam_pkcs11.so nullok try_first_pass pkcs11_module=/usr/local/lib/pkcs11/opensc-pkcs11.so ca_dir=/etc/pam_pkcs11 crl_dir=/etc/pam_pkcs11 cert_policy=none

Steps to reproduce:
-> Install pcsclite, opensc, pam_pkcs11, libp11, engine_pkcs11
-> Create a certificate on smartcard using pkcs15-init
-> Enable smartcard login via PAM
-> Login to system using smart card

n.b. I'm not sure if this is a gnome issue or arch issue, nor what the effects of removing the smartcard plugin from gnome are.
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 02 June 2012, 13:17 GMT
Reason for closing:  No response
Comment by Ionut Biru (wonder) - Friday, 13 January 2012, 18:47 GMT
please compile gnome-settings-daemon with debug symbols [1],
kill gnome-settings-daemon two times and then run it in gdb to get a better trace.

[1] https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#One_package_settings_only

Comment by James (n_K) - Wednesday, 18 January 2012, 07:43 GMT
GDB log;

#0 0xb4081e5f in SECMOD_WaitForAnyTokenEvent () from /usr/lib/libnss3.so
#1 0xb41f343b in gsd_smartcard_manager_worker_watch_for_and_process_event (
error=0xb3e6f1b8, worker=0x80f9e20) at gsd-smartcard-manager.c:1256
#2 gsd_smartcard_manager_worker_run (worker=0x80f9e20)
at gsd-smartcard-manager.c:1386
#3 0xb7595344 in ?? () from /usr/lib/libglib-2.0.so.0
#4 0xb77fed4c in start_thread () from /lib/libpthread.so.0
#5 0xb747203e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further
The program being debugged has been started already.
Start it from the beginning? (y or n)
Starting program: /usr/local/libexec/gnome-settings-daemon
[Thread debugging using libthread_db enabled]
[New Thread 0xb6e12b40 (LWP 14262)]
[New Thread 0xb64ffb40 (LWP 14263)]
[New Thread 0xb5affb40 (LWP 14264)]
[New Thread 0xb50ffb40 (LWP 14265)]
[New Thread 0xb3e69b40 (LWP 14266)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb3e69b40 (LWP 14266)]
0xb4081e5f in SECMOD_WaitForAnyTokenEvent () from /usr/lib/libnss3.so
#0 0xb4081e5f in SECMOD_WaitForAnyTokenEvent () from /usr/lib/libnss3.so
#1 0xb41f343b in gsd_smartcard_manager_worker_watch_for_and_process_event (
error=0xb3e691b8, worker=0x80e6f40) at gsd-smartcard-manager.c:1256
#2 gsd_smartcard_manager_worker_run (worker=0x80e6f40)
at gsd-smartcard-manager.c:1386
#3 0xb7595344 in ?? () from /usr/lib/libglib-2.0.so.0
#4 0xb77fed4c in start_thread () from /lib/libpthread.so.0
#5 0xb747203e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further
Comment by Ionut Biru (wonder) - Wednesday, 18 January 2012, 09:14 GMT
why /usr/local/libexec/gnome-settings-daemon ?
Comment by James (n_K) - Wednesday, 18 January 2012, 20:20 GMT
I found it easier to download the source and compile it than to work out how to modify flags on the prebuilt arch version using the flags and steps from the 'no-pulseaudio' aur package minus the -no-pulse flag, which I guess indicates that the problem is with gnome and not with arch?
Comment by James (n_K) - Saturday, 28 January 2012, 23:19 GMT
I've just installed arch x86_64 fresh and tried the same proceedure for setting up logging in via smartcard and the same crash with gnome-settings-daemon happens
Comment by Ionut Biru (wonder) - Saturday, 28 January 2012, 23:22 GMT
@James i'm sorry for not replying. Please report this to gnome bugzilla and paste the link here but before doing this, recompile glib2 as well
Comment by James (n_K) - Sunday, 29 January 2012, 12:16 GMT
OK, I've opened a bug report on the gnome bug tracker; https://bugzilla.gnome.org/show_bug.cgi?id=668950
Comment by Ionut Biru (wonder) - Saturday, 28 April 2012, 12:11 GMT
status with gnome 3.4?

Loading...