libpcsclite.so versions >1.4.99 and <1.8.25 causes crash of firefox/chrome

Bug #294830 reported by petar
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pcsc-lite (Ubuntu)
Fix Committed
Undecided
Unassigned

Bug Description

pcscd with version after 1.4.99 causes crash of firefox if smart card reader is not inserted, and in result firefox can not start

in Ubuntu 8.10 package pcscd 1.4.102-1u is not good, i recommend to rollback to 1.4.99 or older version of pcscd

this issue is not only in Ubuntu, it persist in Slackware too

configuration - reader Omnikey 6121 with smart card Siemens HiPath SIcurity card

Revision history for this message
Teodor Milkov (tm-del) wrote :

I'm also affected by this bug.

OmniKey 6121 + HiPath SIcurity Card API V3.1.010.

It used to work fine with Hardy.

Revision history for this message
Timothy Redaelli (timothy-redaelli) wrote :

Binary: pcscd

affects: ubuntu → pcsc-lite (Ubuntu)
Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

There is no link between pcscd and firefox.

The crash should be in the PKCS#11 library you have configured in Firefox for the "Siemens HiPath SIcurity card".

Uninstall the PKCS#11 and try to reproduce the crash.

Revision history for this message
Teodor Milkov (tm-del) wrote :

I'm aware there's no direct relation between firefox and pcscd. It is incompatibility between PKCS#11 shared object and pcscd causes firefox to crash. Nevertheless I haven't changed my PKCS#11 library (and there's no newer version) and it is the pcscd upgrade that led to firefox crashes.

I'm going to try to figure this out with my smart card vendor or maybe using opensc.

Revision history for this message
Teodor Milkov (tm-del) wrote :

It seems current versions of OpenSC/OpenCT work fine with my OmniKey 6121. So I'm going to use the OpenSC supplied PKCS#11 library and NOT the proprietary (HiPath SIcurity Card API V3.1.010) PKCS#11 library. Problem solved for me.

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

It is not pcscd but, maybe, libpcsclite.so.1.

You should provide a debug backtrace of the crash. Execute in a shell:
$ /usr/bin/firefox -g
This should start firefox in the gdb debugger. Then enter
(gdb) run
and wait for the crash. Then enter
(gdb) backtrace
and add the generated trace to this bug report

Revision history for this message
Nicolas DERIVE (kalon33) wrote :

Does this problem still occur on recent Ubuntu versions (Karmic, Lucid, Maverick)?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pcsc-lite (Ubuntu):
status: New → Confirmed
Revision history for this message
Jalakas (jalakas) wrote :

Had same problem, constant firefox crashes.

Crashed thread had always same pattern: libOcsCryptoki.so -> libpcsclite.so.1.0.0 -> libc-2.29.so -> crash

Managed to get rid of firefox crashes by replacing:
pcscd 1.8.24-1
libpcsclite1 1.8.24-1

versions with debian:
pcscd 1.8.25-1 https://packages.debian.org/sid/pcscd
libpcsclite1 1.8.25-1 https://packages.debian.org/sid/libpcsclite1

I suggest updating ubuntu package versions.

Revision history for this message
Jalakas (jalakas) wrote :

...
[New Thread 0x7fffe18ff700 (LWP 5650)]
*** buffer overflow detected ***: /usr/lib/firefox/firefox terminated
Thread 411 "SSL Cert #32" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffd35be700 (LWP 5576)]
0x00007ffff79d2fb7 in raise () from /lib/x86_64-linux-gnu/libc.so.6

(gdb) backtrace
#0 0x00007ffff79d2fb7 in raise () at /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff79b4535 in abort () at /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff7a1b7b6 in () at /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff7abe76f in () at /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007ffff7abe791 in () at /lib/x86_64-linux-gnu/libc.so.6
#5 0x00007ffff7abd0c0 in () at /lib/x86_64-linux-gnu/libc.so.6
#6 0x00007ffff7abe677 in () at /lib/x86_64-linux-gnu/libc.so.6
#7 0x00007fffe2e3cb06 in () at /usr/lib/x86_64-linux-gnu/libpcsclite.so.1
#8 0x00007fffe2e3cc56 in () at /usr/lib/x86_64-linux-gnu/libpcsclite.so.1
#9 0x00007fffe2e3a405 in SCardEstablishContext () at /usr/lib/x86_64-linux-gnu/libpcsclite.so.1
#10 0x00007fffdea43729 in CPCSCDeviceManager::getDevices() () at /usr/local/AWP/lib/libOcsCryptoki.so
#11 0x00007fffdea24bde in CVirtualSlotManager::getSlots(bool, int&, unsigned long*) () at /usr/local/AWP/lib/libOcsCryptoki.so
#12 0x00007fffdea154b2 in CCryptoki::getSlotList(unsigned char, unsigned long*, unsigned long*) () at /usr/local/AWP/lib/libOcsCryptoki.so
#13 0x00007fffdea23570 in C_GetSlotList () at /usr/local/AWP/lib/libOcsCryptoki.so
#14 0x00007fffdeefcf05 in C_GetSlotList () at /usr/local/AWP/lib/libOcsPKCS11Wrapper.so
#15 0x00007ffff756913c in SECMOD_UpdateSlotList () at /usr/lib/firefox/libnss3.so
#16 0x00007ffff154ab5b in () at /usr/lib/firefox/libxul.so
#17 0x00007fffee39c9c0 in () at /usr/lib/firefox/libxul.so
#18 0x00007fffee39e3f9 in () at /usr/lib/firefox/libxul.so
#19 0x00007ffff152cd7d in () at /usr/lib/firefox/libxul.so
#20 0x00007ffff152ed9c in () at /usr/lib/firefox/libxul.so
#21 0x00007fffee43a07f in () at /usr/lib/firefox/libxul.so
#22 0x00007fffee438a7e in () at /usr/lib/firefox/libxul.so
#23 0x00007fffee43acc8 in () at /usr/lib/firefox/libxul.so
#24 0x00007fffee89daaa in () at /usr/lib/firefox/libxul.so
#25 0x00007fffee872205 in () at /usr/lib/firefox/libxul.so
#26 0x00007fffee43af71 in () at /usr/lib/firefox/libxul.so
#27 0x00007ffff75eb984 in () at /usr/lib/firefox/libnspr4.so
#28 0x00007ffff7d84182 in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#29 0x00007ffff7aacfaf in clone () at /lib/x86_64-linux-gnu/libc.so.6
(gdb)

Jalakas (jalakas)
summary: - latest pcscd causes crash of firefox
+ libpcsclite.so versions >1.4.99 and <1.8.25 causes crash of
+ firefox/chrome
Changed in pcsc-lite (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

Jalakas, please install the package libpcsclite1-dbg and generate a new backtrace.

I suspect a bug in the proprietary PKCS#11 library /usr/local/AWP/lib/libOcsCryptoki.so

Revision history for this message
Jalakas (jalakas) wrote :

Only version libpcsclite1-dbg_1.8.23-1_amd64.deb was available, but seems to be the same crash.
Also got firefox-dbg.

Backtrace added.

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

#7 0x00007fffdef0702e in MessageSend (buffer_void=buffer_void@entry=0x7fffd60030d0, buffer_size=buffer_size@entry=8, filedes=filedes@entry=1024) at winscard_msg.c:372

The file descriptor value is 1024. This is the default maximum number of opened file for a process.
You can check that using "ulimit -n".

The GNU libC then aborts the call, but your backtrace does not indicate the name of the function that is aborted. I guess it is send(2).

Using more than 1024 opened files is NOT normal. I really suspect a bug in the proprietary PKCS#11 library /usr/local/AWP/lib/libOcsCryptoki.so
You can increase the limit using "ulimit -n 2000" just to see what happens.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.