A double free when handling responses from an HSM Card in sc_pkcs15emu_sc_hsm_init in libopensc/pkcs15-sc-hsm.c in OpenSC before 0.19.0-rc1 could be used by attackers able to supply crafted smartcards to cause a denial of service (application crash) or possibly have unspecified other impact. External References: https://www.x41-dsec.de/lab/advisories/x41-2018-002-OpenSC/ Upstream Patch: https://github.com/OpenSC/OpenSC/commit/360e95d45ac4123255a4c796db96337f332160ad#diff-d643a0fa169471dbf2912f4866dc49c5
Created opensc tracking bugs for this issue: Affects: fedora-all [bug 1628024]
Does not appear to affect opensc-0.16.0, which bails out early when unable to read EF.C_DevAut rather than attempting to save the context and continue.