Skip to content

[AUTOPATCHER-CORE] Upgrade opensc to 0.26.1 for fixing multiple CVEs #13981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.0-dev
Choose a base branch
from

Conversation

CBL-Mariner-Bot
Copy link
Collaborator

@CBL-Mariner-Bot CBL-Mariner-Bot commented Jun 10, 2025

[AUTOPATCHER-CORE] Upgrade opensc to 0.26.1 for fixing Multiple CVEs
Upgrade pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=832115&view=results

buddy build -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=832116&view=results

CVEs

CVE-2024-45615: Usage of uninitialized values in libopensc and pkcs15init (#3225)
CVE-2024-45616: Uninitialized values after incorrect check or usage of APDU response values in libopensc (#3225)
CVE-2024-45617: Uninitialized values after incorrect or missing checking return values of functions in libopensc (#3225)
CVE-2024-45618: Uninitialized values after incorrect or missing checking return values of functions in pkcs15init (#3225)
CVE-2024-45619: Incorrect handling length of buffers or files in libopensc (#3225)
CVE-2024-45620: Incorrect handling of the length of buffers or files in pkcs15init (#3225)
CVE-2024-8443: Heap buffer overflow in OpenPGP driver when generating key (#3219)

@kgodara912
Copy link
Contributor

kgodara912 commented Jun 10, 2025

PR checks are failing because access issues.
There are multiple CVEs/bugs fixed as part of upgrade to 0.26.1. Each CVE has multiple fuzz checker PRs which makes porting time consuming process. Hence upgrading version of OpenSC to address all the CVEs.
Release notes: OpenSC 0.26.0 and OpenSC 0.26.1. License file issue will try to fix.

Buddy build

@kgodara912 kgodara912 changed the title [AUTOPATCHER-CORE] Upgrade opensc to 0.26.1 for CVE-2024-45619 [AUTOPATCHER-CORE] Upgrade opensc to 0.26.1 for fixing multiple CVEs Jun 10, 2025
@kgodara912 kgodara912 force-pushed the cblmargh/opensc-upgrade-to-0.26.1-3.0-dev branch from 361c1da to a3097ac Compare June 10, 2025 06:44
@kgodara912 kgodara912 marked this pull request as ready for review June 10, 2025 09:01
@kgodara912 kgodara912 requested a review from a team as a code owner June 10, 2025 09:01
@Kanishk-Bansal
Copy link
Contributor

Upon re ran, all checks passed

Buddy Build

@LeoMar4
Copy link

LeoMar4 commented Jun 11, 2025

PR checks are failing because access issues. There are multiple CVEs/bugs fixed as part of upgrade to 0.26.1. Each CVE has multiple fuzz checker PRs which makes porting time consuming process. Hence upgrading version of OpenSC to address all the CVEs. Release notes: OpenSC 0.26.0 and OpenSC 0.26.1. License file issue will try to fix.

Buddy build

@kgodara912 As per 0.26.0 version up release notes, can you confirm if any ABI breaks as it looks like many changes related to security areas depending on openssl, pkcs-tool and others.

@Kanishk-Bansal
Copy link
Contributor

I have initiated a Full Build

@0xba1a
Copy link
Contributor

0xba1a commented Jun 13, 2025

@LeoMar4 will take the stable-maintainer review as he already started reviewing this PR.

@kgodara912
Copy link
Contributor

@LeoMar4, As per the release notes descriptions, following are the changes which may seem like breaking compatibility. As per the documentation of the bugs, they don't seem to break backward compatibility.

  1. Extend the p11test to support kryoptic OpenSC/OpenSC#3141 -> "This mostly fixes some corner case of the p11test"
  2. Normalize logging of OpenSSL errors  OpenSC/OpenSC#2922 -> Logging unification
  3. feat(pkcs11-tool): don't limit object size to 5000 bytes OpenSC/OpenSC#3174 -> Removing limitation so should enhance the compatibility
  4. pkcs15-jpki.c - minidriver problem with reading public key OpenSC/OpenSC#3182 -> Bug fix.

The following two changes may break ABI
OpenSC/OpenSC#3109

The V1.8 applet has a few differences to the older applets. This causes the OpenSC PKCS#11 module to not be able to sign anything with the Belpic driver on this card.

While the best solution is to implement the required changes to make this work correctly, for the time being it's better to not confuse users by claiming we support the card when in reality we don't.

OpenSC/OpenSC#3152 -> If previously someone was using this CARD, then it may break for them, but these cards seem obsolete and no reference I could get for purchasing them.

This PR deactivates card-mcrd driver due to no recent user or developer activity.
The only recent changes in the driver concerns EstEID card, which support was removed in https://github.com/OpenSC/OpenSC/commit/7c19a920d7c94efa3695967b61d6981900503218. For further usage, the driver can be enabled via card_drivers in configuration file.

From the documentation, I think it can be merged and if any historical issue comes, we can address them by reverting.

PR checks and full build has no failures, and all the packages built fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants