Vulnerability · Published Feb 18, 2022 · Assigned by GitHub_M

CVE-2022-23645Out-of-bounds read in swtpm

Medium 6.2

In plain English

A medium-severity out-of-bounds read in swtpm from stefanberger. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.2Medium
Exploit odds (30 days)0.4%top 65.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

swtpm is a libtpms-based TPM emulator with socket, character device, and Linux CUSE interface. Versions prior to 0.5.3, 0.6.2, and 0.7.1 are vulnerable to out-of-bounds read. A specially crafted header of swtpm's state, where the blobheader's hdrsize indicator has an invalid value, may cause an out-of-bounds access when the byte array representing the state of the TPM is accessed. This will likely crash swtpm or prevent it from starting since the state cannot be understood. Users should upgrade to swtpm v0.5.3, v0.6.2, or v0.7.1 to receive a patch. There are currently no known workarounds.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9swtpm0.7.0-3.20211109gitb79fd91.el9ALSA-2022:8100
AlmaLinux:9swtpm-libs0.7.0-3.20211109gitb79fd91.el9ALSA-2022:8100
AlmaLinux:9swtpm-tools0.7.0-3.20211109gitb79fd91.el9ALSA-2022:8100
Debian:12swtpm0.7.1-1DEBIAN-CVE-2022-23645
Debian:13swtpm0.7.1-1DEBIAN-CVE-2022-23645
Debian:14swtpm0.7.1-1DEBIAN-CVE-2022-23645
Rocky Linux:8hivex0:1.3.18-23.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8hivex0:1.3.18-23.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8libguestfs1:1.44.0-9.module+el8.7.0+1084+97b81f61.rockyRLSA-2022:7472
Rocky Linux:8libguestfs-winsupport0:8.6-1.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8libguestfs-winsupport0:8.6-1.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8libiscsi0:1.18.0-8.module+el8.4.0+534+4680a14eRLSA-2022:7472
Rocky Linux:8libiscsi0:1.18.0-8.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8libiscsi0:1.18.0-8.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8libnbd0:1.6.0-5.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8libnbd0:1.6.0-5.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8libtpms0:0.9.1-1.20211126git1ff6fe1f43.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8libvirt0:8.0.0-10.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8libvirt-dbus0:1.3.0-2.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8libvirt-dbus0:1.3.0-2.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8libvirt-dbus0:1.3.0-2.module+el8.4.0+534+4680a14eRLSA-2022:7472
Rocky Linux:8libvirt-python0:8.0.0-2.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8nbdkit0:1.24.0-4.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8netcf0:0.2.8-12.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8netcf0:0.2.8-12.module+el8.4.0+534+4680a14eRLSA-2022:7472
Rocky Linux:8netcf0:0.2.8-12.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8perl-Sys-Virt0:8.0.0-1.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8perl-Sys-Virt0:8.0.0-1.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8qemu-kvm5:6.2.0-20.module+el8.7.0+1084+97b81f61.2RLSA-2022:7472
Rocky Linux:8seabios0:1.16.0-3.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8sgabios1:0.20170427git-3.module+el8.6.0+847+b490afddRLSA-2022:7472
Rocky Linux:8sgabios1:0.20170427git-3.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8sgabios1:0.20170427git-3.module+el8.4.0+534+4680a14eRLSA-2022:7472
Rocky Linux:8supermin0:5.2.1-2.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8swtpm0:0.7.0-4.20211109gitb79fd91.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Rocky Linux:8virt-v2v1:1.42.0-21.module+el8.7.0+1084+97b81f61RLSA-2022:7472
Ubuntu:22.04:LTSswtpm0.6.3-0ubuntu3UBUNTU-CVE-2022-23645

Affected products (as reported)

VendorProductVersions
stefanberger swtpm < 0.5.3>= 0.6.0, < 0.6.2= 0.7.0

Weakness: CWE-125 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References