Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package opensc for openSUSE:Factory checked in at 2023-06-01 17:21:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opensc (Old) and /work/SRC/openSUSE:Factory/.opensc.new.2531 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opensc" Thu Jun 1 17:21:21 2023 rev:53 rq:1090293 version:0.23.0 Changes: -------- --- /work/SRC/openSUSE:Factory/opensc/opensc.changes 2022-12-01 16:59:12.355154460 +0100 +++ /work/SRC/openSUSE:Factory/.opensc.new.2531/opensc.changes 2023-06-01 17:21:22.194818201 +0200 @@ -1,0 +2,7 @@ +Thu Jun 1 12:55:19 UTC 2023 - Otto Hollmann <[email protected]> + +- Security Fix: [CVE-2023-2977, bsc#1211894] + * opensc: out of bounds read in pkcs15 cardos_have_verifyrc_package() + * Add opensc-CVE-2023-2977.patch + +------------------------------------------------------------------- New: ---- opensc-CVE-2023-2977.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opensc.spec ++++++ --- /var/tmp/diff_new_pack.FX6U8W/_old 2023-06-01 17:21:22.718821307 +0200 +++ /var/tmp/diff_new_pack.FX6U8W/_new 2023-06-01 17:21:22.722821331 +0200 @@ -1,7 +1,7 @@ # # spec file for package opensc # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,8 @@ # https://web.archive.org/web/20111225073733/http://www.opensc-project.org/opensc/ticket/390 Source3: opensc.module Patch0: opensc-gcc11.patch +# PATCH-FIX-UPSTREAM: bsc#1211894, CVE-2023-2977 out of bounds read in pkcs15 cardos_have_verifyrc_package() +Patch1: opensc-CVE-2023-2977.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: libxslt BuildRequires: pkgconfig @@ -59,8 +61,7 @@ may require third party proprietary software. %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build %configure \ ++++++ opensc-CVE-2023-2977.patch ++++++ >From 3bf3ab2f9091f984cda6dd910654ccbbe3f06a40 Mon Sep 17 00:00:00 2001 From: fullwaywang <[email protected]> Date: Mon, 29 May 2023 10:38:48 +0800 Subject: [PATCH] pkcs15init: correct left length calculation to fix buffer overrun bug. Fixes #2785 --- src/pkcs15init/pkcs15-cardos.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pkcs15init/pkcs15-cardos.c b/src/pkcs15init/pkcs15-cardos.c index 9715cf390f..f41f73c349 100644 --- a/src/pkcs15init/pkcs15-cardos.c +++ b/src/pkcs15init/pkcs15-cardos.c @@ -872,7 +872,7 @@ static int cardos_have_verifyrc_package(sc_card_t *card) sc_apdu_t apdu; u8 rbuf[SC_MAX_APDU_BUFFER_SIZE]; int r; - const u8 *p = rbuf, *q; + const u8 *p = rbuf, *q, *pp; size_t len, tlen = 0, ilen = 0; sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, 0xca, 0x01, 0x88); @@ -888,13 +888,13 @@ static int cardos_have_verifyrc_package(sc_card_t *card) return 0; while (len != 0) { - p = sc_asn1_find_tag(card->ctx, p, len, 0xe1, &tlen); - if (p == NULL) + pp = sc_asn1_find_tag(card->ctx, p, len, 0xe1, &tlen); + if (pp == NULL) return 0; if (card->type == SC_CARD_TYPE_CARDOS_M4_3) { /* the verifyRC package on CardOS 4.3B use Manufacturer ID 0x01 */ /* and Package Number 0x07 */ - q = sc_asn1_find_tag(card->ctx, p, tlen, 0x01, &ilen); + q = sc_asn1_find_tag(card->ctx, pp, tlen, 0x01, &ilen); if (q == NULL || ilen != 4) return 0; if (q[0] == 0x07) @@ -902,7 +902,7 @@ static int cardos_have_verifyrc_package(sc_card_t *card) } else if (card->type == SC_CARD_TYPE_CARDOS_M4_4) { /* the verifyRC package on CardOS 4.4 use Manufacturer ID 0x03 */ /* and Package Number 0x02 */ - q = sc_asn1_find_tag(card->ctx, p, tlen, 0x03, &ilen); + q = sc_asn1_find_tag(card->ctx, pp, tlen, 0x03, &ilen); if (q == NULL || ilen != 4) return 0; if (q[0] == 0x02)
