32 Commits

Author SHA1 Message Date
Zhang Peng
4cbf9d8d2c opensc: fix CVE-2023-5992
CVE-2023-5992:
A vulnerability was found in OpenSC where PKCS#1 encryption padding removal is not
implemented as side-channel resistant. This issue may result in the potential leak
of private data.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2023-5992]
[https://github.com/OpenSC/OpenSC/wiki/CVE-2023-5992]

Upstream patches:
[https://github.com/OpenSC/OpenSC/pull/2948]
[https://github.com/OpenSC/OpenSC/pull/3016]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-11-02 15:09:01 +01:00
Zhang Peng
c028b36527 opensc: fix CVE-2024-45620
CVE-2024-45620:
A vulnerability was found in the pkcs15-init tool in OpenSC. An attacker could use
a crafted USB Device or Smart Card, which would present the system with a specially
crafted response to APDUs. When buffers are partially filled with data, initialized
parts of the buffer can be incorrectly accessed.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-45620]

Upstream patches:
[a1bcc6516f]
[6baa195965]
[468a314d76]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:28:56 -05:00
Zhang Peng
d51c6495e0 opensc: fix CVE-2024-45619
CVE-2024-45619:
A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK.
An attacker could use a crafted USB Device or Smart Card, which would present the system
with a specially crafted response to APDUs. When buffers are partially filled with data,
initialized parts of the buffer can be incorrectly accessed.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-45619]

Upstream patches:
[f01bfbd19b]
[a1d8c01c1c]
[673065630b]
[e20ca25204]
[2b6cd52775]
[dd554a2e1e]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:28:53 -05:00
Zhang Peng
47939c2bdc opensc: fix CVE-2024-45618
CVE-2024-45618:
A vulnerability was found in pkcs15-init in OpenSC. An attacker could use a crafted
USB Device or Smart Card, which would present the system with a specially crafted
response to APDUs. Insufficient or missing checking of return values of functions
leads to unexpected work with variables that have not been initialized.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-45618]

Upstream patches:
[8632ec172b]
[f9d68660f0]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:28:50 -05:00
Zhang Peng
4fff381a22 opensc: fix CVE-2024-45617
CVE-2024-45617:
A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK.
An attacker could use a crafted USB Device or Smart Card, which would present the system
with a specially crafted response to APDUs. Insufficient or missing checking of return
values of functions leads to unexpected work with variables that have not been initialized.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-45617]

Upstream patches:
[fdb9e903eb]
[fdb9e903eb]
[efbc14ffa1]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:28:47 -05:00
Zhang Peng
cd6d013e47 opensc: fix CVE-2024-45616
CVE-2024-45616:
A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK.
An attacker could use a crafted USB Device or Smart Card, which would present the system
with a specially crafted response to APDUs. The following problems were caused by
insufficient control of the response APDU buffer and its length when communicating
with the card.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-45616]

Upstream patches:
[1d3b410e06]
[265b28344d]
[e7177c7ca0]
[ef7b10a18e]
[76115e3479]
[16ada9dc7c]
[3562969c90]
[cccdfc46b1]
[5fa758767e]
[aa102cd9ab]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:28:43 -05:00
Zhang Peng
ecdd64cf48 opensc: fix CVE-2024-45615
CVE-2024-45615:
A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK.
The problem is missing initialization of variables expected to be initialized
(as arguments to other functions, etc.).

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-45615]

Upstream patches:
[5e4f26b510]
[7d68a7f442]
[bb3dedb71e]
[42d718dfcc]
[bde991b0fe]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:26:09 -05:00
Zhang Peng
394846f988 opensc: fix CVE-2024-8443
CVE-2024-8443:
The Easy Mega Menu Plugin for WordPress – ThemeHunk plugin for WordPress is vulnerable
to Stored Cross-Site Scripting via the ‘themehunk_megamenu_bg_image' parameter in all
versions up to, and including, 1.1.0 due to insufficient input sanitization and output
escaping. This makes it possible for authenticated attackers, with subscriber-level
access and above, to inject arbitrary web scripts in pages that will execute whenever
a user accesses an injected page. Please note that this was partially fixed in 1.1.0
due to the missing authorization protection that was added.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-8433]

Upstream patches:
[02e8474583]
[b28a3cef41]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:26:06 -05:00
Zhang Peng
7e91b406fa opensc: fix CVE-2024-1454
CVE-2024-1454:
The use-after-free vulnerability was found in the AuthentIC driver in OpenSC packages,
occuring in the card enrolment process using pkcs15-init when a user or administrator
enrols or modifies cards. An attacker must have physical access to the computer system
and requires a crafted USB device or smart card to present the system with specially
crafted responses to the APDUs, which are considered high complexity and low severity.
This manipulation can allow for compromised card management operations during enrolment.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-1454]

Upstream patches:
[5835f0d4f6]

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:26:03 -05:00
Niko Mauno
41dba53932 opensc: Fix LICENSE declaration
According to https://github.com/OpenSC/OpenSC/wiki#license OpenSC is
licensed under LGPL-2.1 or later, which seems to be affirmed also by
the comments in the source code files, as well as the COPYING file.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-09-22 10:12:43 -04:00
virendra thakur
d54a73ac5f opensc: Fix CVE-2023-40661
Add patch file to fix CVE

Upstream-Status: Backport[8026fb4ca0]

Signed-off-by: virendra thakur <virendrak@kpit.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-02-07 18:41:41 -05:00
virendra thakur
2c3c2d25b6 opensc: Fix CVE-2023-40660
Add patch file to fix CVE

Upstream-Status: Backport [940e8bc764]

Signed-off-by: virendra thakur <virendrak@kpit.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-02-07 18:41:41 -05:00
Jose Quaresma
43a4259f68 opensc: ignore CVE-2021-34193
The CVE-2021-34193 is a duplicate CVE covering the 5 individual already fixed.

https://github.com/OpenSC/OpenSC/pull/2855

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-09-19 07:55:41 -04:00
Soumya
ec47660654 opensc: Fix CVE-2023-2977
A vulnerbility was found in OpenSC. This security flaw cause a buffer overrun
vulnerability in pkcs15 cardos_have_verifyrc_package. The attacker can supply
a smart card package with malformed ASN1 context. The cardos_have_verifyrc_package
function scans the ASN1 buffer for 2 tags, where remaining length is wrongly
caculated due to moved starting pointer. This leads to possible heap-based buffer
oob read. In cases where ASAN is enabled while compiling this causes a crash.
Further info leak or more damage is possible.

Signed-off-by: Soumya <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-07-02 11:17:33 -04:00
Khem Raj
14c7d8a0d7 recipes: Update LICENSE variable to use SPDX license identifiers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-04 17:41:45 -08:00
Richard Purdie
b402a3076f recipes: Update SRC_URI branch and protocols
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:49 -07:00
Alexander Kanavin
c61044d58e opensc: do not use -Werror
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-14 07:16:58 -07:00
wangmy
6a0c9ea9d3 opensc: upgrade 0.21.0 -> 0.22.0
Use standard paths for file cache on Linux and OSX
Various issues of memory/buffer handling in legacy drivers mostly
reported by oss-fuzz and coverity (tcos, oberthur, isoapplet, iasecc,
westcos, gpk, flex, dnie, mcrd, authentic, belpic)
Add threading test to pkcs11-tool
Add support to generate generic secret keys
opensc-explorer: Print information about LCS (Life cycle status byte)
Add support for Apple's arm64 (M1) binaries, removed TokenD.
A seperate installer with TokenD (and without arm64 binaries) will be available.
Support for gcc11 and its new strict aliasing rules
Initial support for building with OpenSSL 3.0
pkcs15-tool: Write data objects in binary mode
Avoid limited size of log messages

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-23 22:00:39 -07:00
Martin Jansa
c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
Zheng Ruoqin
c3f59819a7 opensc: Fix the wrong version number.
The corresponding version number of commit 30180986a08cf71fe4af4b50251a8bb5b1ab95af is 0.21.0.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-01-12 00:54:53 -08:00
Zang Ruochen
1df71a454c opensc: upgrade 0.20.0 -> 0.20.1
-License-Update: The address is updated as follows
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-12-03 22:32:56 -08:00
Khem Raj
8bb1fabfc5 opensc: Upgrade to 0.20.0
Drop all patches as they are already included in 0.20.0 release

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-17 15:44:06 -08:00
Khem Raj
bbb5732a4f opensc: Fix misaligned indentation
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-28 00:11:47 -08:00
Laurent Bonnans
40b3a51231 opensc: fix RDEPENDS in pcsc PACKAGECONFIG
OpenSC depends on pcsc-lite's systemd service and pkcs11 library at
runtime.

Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-05 23:01:06 -08:00
Jan Luebbe
8edd760e66 opensc: add support for native builds
This is needed as a dependency when using SoftHSM from the PKCS#11
OpenSSL engine for code singing.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-11-22 09:22:47 -08:00
Jan Luebbe
060ad325b6 opensc: use pcsc-lite instead of openct by default
OpenCT upstream maintenance seems to have stopped and OpenSC upstream
uses pcsc-lite by default in their configure script. Add PACKAGECONFIGs
for each and select pcsc by default.

As the openct package depends on pcsc-lite by itself, this avoids an
unnecessary package in the default case.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-11-22 09:22:47 -08:00
Khem Raj
c011beeaa6 opensc: Upgrade to 0.19.0
Switch fetcher to use github
Add patch to build with gcc9
Remove upstreamed patch
Inherit bash-completion

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-18 22:15:59 -08:00
Armin Kuster
c26b10b155 opensc: 0.18.0 version fix fetch error
ERROR: opensc-0.18.0-r0 do_fetch: Fetcher failure for URL: 'http://ftp.debian.org/debian/pool/main/o/opensc/opensc_0.18.0.orig.tar.gz'. Unable to fetch URL from any source.

This version is no longer hosted on the main debian URL so
use the archive URL

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-11-16 14:46:44 -08:00
Khem Raj
79d66aea14 opensc: Upgrade to 0.18.0
* Fixes build with OpenSSL 1.1.x
* Fix build with gcc8

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-08 13:32:12 -07:00
Derek Straka
7d12dd413f opensc: update to version 0.16.0
Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-08-22 15:49:25 +02:00
Li xin
9d2fc54c80 opensc: upgrade 0.14.0 -> 0.15.0
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-07-30 21:22:24 +02:00
Li xin
9b15b32690 opensc: add new recipe
OpenSC provides a set of libraries and utilities to work with smart cards.
Its main focus is on cards that support cryptographic operations, and
facilitate their use in security applications such as authentication,
mail encryption and digital signatures.

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-02-12 19:37:20 +01:00