Debian DLA-3463-1 : opensc - LTS security update

high Nessus Plugin ID 177462

Synopsis

The remote Debian host is missing one or more security-related updates.

Description

The remote Debian 10 host has packages installed that are affected by multiple vulnerabilities as referenced in the dla-3463 advisory.

- sc_context_create in ctx.c in libopensc in OpenSC 0.19.0 has a memory leak, as demonstrated by a call from eidenv. (CVE-2019-6502)

- A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid. (CVE-2021-42779)

- A use after return issue was found in Opensc before version 0.22.0 in insert_pin function that could potentially crash programs using the library. (CVE-2021-42780)

- Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library. (CVE-2021-42781)

- Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library. (CVE-2021-42782)

- 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. (CVE-2023-2977)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade the opensc packages.

For Debian 10 buster, these problems have been fixed in version 0.19.0-1+deb10u2.

See Also

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037021

https://security-tracker.debian.org/tracker/source-package/opensc

https://www.debian.org/lts/security/2023/dla-3463

https://security-tracker.debian.org/tracker/CVE-2019-6502

https://security-tracker.debian.org/tracker/CVE-2021-42779

https://security-tracker.debian.org/tracker/CVE-2021-42780

https://security-tracker.debian.org/tracker/CVE-2021-42781

https://security-tracker.debian.org/tracker/CVE-2021-42782

https://security-tracker.debian.org/tracker/CVE-2023-2977

https://packages.debian.org/source/buster/opensc

Plugin Details

Severity: High

ID: 177462

File Name: debian_DLA-3463.nasl

Version: 1.0

Type: local

Agent: unix

Published: 6/21/2023

Updated: 6/21/2023

Supported Sensors: Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.2

CVSS v2

Risk Factor: Medium

Base Score: 5

Temporal Score: 3.9

Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P

CVSS Score Source: CVE-2021-42782

CVSS v3

Risk Factor: High

Base Score: 7.1

Temporal Score: 6.4

Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

CVSS Score Source: CVE-2023-2977

Vulnerability Information

CPE: cpe:/o:debian:debian_linux:10.0, p-cpe:/a:debian:debian_linux:opensc, p-cpe:/a:debian:debian_linux:opensc-pkcs11

Required KB Items: Host/local_checks_enabled, Host/Debian/release, Host/Debian/dpkg-l

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 6/21/2023

Vulnerability Publication Date: 1/22/2019

Reference Information

CVE: CVE-2019-6502, CVE-2021-42779, CVE-2021-42780, CVE-2021-42781, CVE-2021-42782, CVE-2023-2977