Skip to content
OpenAdvisories
Medium · 6.2 CVE-2022-23645 EUVD-2022-28593

Out-of-bounds read in swtpm

Published Feb 18, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
stefanberger swtpm < 0.5.3, >= 0.6.0, < 0.6.2, = 0.7.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 swtpm 0.7.1-1 —
Debian 13 swtpm 0.7.1-1 —
Debian 12 swtpm 0.7.1-1 —
ReleasePackageFixed inAdvisory
RHEL 9 swtpm +2 0.7.0-3.20211109gitb79fd91.el9 RHSA-2022:8100
RHEL 8 SLOF 20210217-1.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 hivex +6 1.3.18-23.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 libguestfs-winsupport 8.6-1.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 libiscsi +2 1.18.0-8.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 libnbd +6 1.6.0-5.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 libtpms +1 0.9.1-1.20211126git1ff6fe1f43.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 libvirt +27 8.0.0-10.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 libvirt-dbus 1.3.0-2.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 libvirt-python +1 8.0.0-2.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 nbdkit +18 1.24.0-4.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 netcf +2 0.2.8-12.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 perl-Sys-Virt 8.0.0-1.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 qemu-img +14 15:6.2.0-20.module+el8.7.0+16689+53d59bc2.1 RHSA-2022:7472
RHEL 8 seabios +2 1.16.0-3.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 sgabios +1 1:0.20170427git-3.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 supermin +1 5.2.1-2.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 swtpm +4 0.7.0-4.20211109gitb79fd91.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 virt-dib +24 1:1.44.0-9.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472
RHEL 8 virt-v2v +3 1:1.42.0-21.module+el8.7.0+16689+53d59bc2 RHSA-2022:7472

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 swtpm +2 0.7.0-3.20211109gitb79fd91.el9 ALSA-2022:8100

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 hivex 1.3.18-23.module+el8.6.0+847+b490afdd RLSA-2022:7472
Rocky Linux 8 libguestfs 1:1.44.0-9.module+el8.7.0+1084+97b81f61.rocky RLSA-2022:7472
Rocky Linux 8 libguestfs-winsupport 8.6-1.module+el8.6.0+847+b490afdd RLSA-2022:7472
Rocky Linux 8 libiscsi 1.18.0-8.module+el8.4.0+534+4680a14e RLSA-2022:7472
Rocky Linux 8 libnbd 1.6.0-5.module+el8.6.0+847+b490afdd RLSA-2022:7472
Rocky Linux 8 libtpms 0.9.1-1.20211126git1ff6fe1f43.module+el8.7.0+1084+97b81f61 RLSA-2022:7472
Rocky Linux 8 libvirt 8.0.0-10.module+el8.7.0+1084+97b81f61 RLSA-2022:7472
Rocky Linux 8 libvirt-dbus 1.3.0-2.module+el8.4.0+534+4680a14e RLSA-2022:7472
Rocky Linux 8 libvirt-python 8.0.0-2.module+el8.7.0+1084+97b81f61 RLSA-2022:7472
Rocky Linux 8 nbdkit 1.24.0-4.module+el8.6.0+847+b490afdd RLSA-2022:7472
Rocky Linux 8 netcf 0.2.8-12.module+el8.4.0+534+4680a14e RLSA-2022:7472
Rocky Linux 8 perl-Sys-Virt 8.0.0-1.module+el8.6.0+847+b490afdd RLSA-2022:7472
Rocky Linux 8 qemu-kvm 5:6.2.0-20.module+el8.7.0+1084+97b81f61.2 RLSA-2022:7472
Rocky Linux 8 seabios 1.16.0-3.module+el8.7.0+1084+97b81f61 RLSA-2022:7472
Rocky Linux 8 sgabios 1:0.20170427git-3.module+el8.4.0+534+4680a14e RLSA-2022:7472
Rocky Linux 8 supermin 5.2.1-2.module+el8.7.0+1084+97b81f61 RLSA-2022:7472
Rocky Linux 8 swtpm 0.7.0-4.20211109gitb79fd91.module+el8.7.0+1084+97b81f61 RLSA-2022:7472
Rocky Linux 8 virt-v2v 1:1.42.0-21.module+el8.7.0+1084+97b81f61 RLSA-2022:7472
ReleasePackageFixed inAdvisory
SLES 15 SP3 swtpm 0.5.3-150300.3.3.1 SUSE-SU-2022:1297-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Micro 5.1 swtpm 0.5.3-150300.3.3.1 SUSE-SU-2022:1297-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed swtpm 0.7.1-1.1 openSUSE-SU-2024:11870-1
openSUSE Leap 15.3 swtpm 0.5.3-150300.3.3.1 SUSE-SU-2022:1297-1

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 swtpm +2 0.7.0-3.20211109gitb79fd91.el9 ELSA-2022-8100
Oracle Linux 8 hivex +6 1.3.18-23.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 libguestfs-winsupport 8.6-1.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 libiscsi +2 1.18.0-8.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 libnbd +6 1.6.0-5.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 libtpms +1 0.9.1-1.20211126git1ff6fe1f43.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 libvirt +27 8.0.0-10.0.1.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 libvirt-dbus 1.3.0-2.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 nbdkit +18 1.24.0-4.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 netcf +2 0.2.8-12.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 perl-Sys-Virt 8.0.0-1.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 python3-libvirt 8.0.0-2.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 qemu-img +14 15:6.2.0-20.module+el8.7.0+20875+5dd40464.1 ELSA-2022-7472
Oracle Linux 8 seabios +2 1.16.0-3.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 sgabios +1 1:0.20170427git-3.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 supermin +1 5.2.1-2.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 swtpm +4 0.7.0-4.20211109gitb79fd91.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 virt-dib +24 1:1.44.0-9.0.1.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 8 virt-v2v +3 1:1.42.0-21.module+el8.7.0+20875+5dd40464 ELSA-2022-7472
Oracle Linux 7 libtpms +1 0.8.8-1.el7 ELSA-2022-9240
Oracle Linux 7 swtpm +3 0.3.4-5.el7 ELSA-2022-9240

Advisories 10

References