1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-11 23:59:50 +02:00
gnupg/scd
NIIBE Yutaka c48cf7e32f scd: Fix a race condition for new_reader_slot.
* scd/apdu.c (reader_table_lock, apdu_init): New.
(new_reader_slot): Serialize by reader_table_lock.
* scd/app.c (lock_app, unlock_app, app_new_register): Fix error code
usage.
(initialize_module_command): Call apdu_init.
* scd/scdaemon.c (main): Handle error for initialize_module_command.

--

This is a long standing bug.  There are two different things; The
serialization of allocating a new SLOT, and the serialization of using
the SLOT.  The latter was implemented in new_reader_slot by lock_slot.
However, the former was not done.  Thus, there was a possible race where
a same SLOT is allocated to multiple threads.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2016-12-29 10:07:43 +09:00
..
apdu.c scd: Fix a race condition for new_reader_slot. 2016-12-29 10:07:43 +09:00
apdu.h scd: Fix a race condition for new_reader_slot. 2016-12-29 10:07:43 +09:00
app-common.h scd: APP centric approach for device management. 2016-12-28 12:29:17 +09:00
app-dinsig.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
app-geldkarte.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
app-help.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
app-nks.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
app-openpgp.c gpg: New option --default-new-key-algo. 2016-12-02 19:47:40 +01:00
app-p15.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
app-sc-hsm.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
app.c scd: Fix a race condition for new_reader_slot. 2016-12-29 10:07:43 +09:00
atr.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
atr.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ccid-driver.c scd: Improve internal CCID driver. 2016-12-27 11:58:54 +09:00
ccid-driver.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
command.c scd: APP centric approach for device management. 2016-12-28 12:29:17 +09:00
iso7816.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
iso7816.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
Makefile.am Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
scdaemon-w32info.rc w32: Add icons and version information. 2013-05-07 21:35:48 +02:00
scdaemon.c scd: Fix a race condition for new_reader_slot. 2016-12-29 10:07:43 +09:00
scdaemon.h scd: Fix a race condition for new_reader_slot. 2016-12-29 10:07:43 +09:00