Security defects in the Trusted Platform Module (TPM) 2.0 reference library specification expose devices to code execution attacks.
A pair of critical security flaws has been discovered by Quarkslab’s security researchers in the Trusted Platform Module (TPM) 2.0 reference library specification. This has resulted in a widespread collaborative effort among vendors to identify and rectify vulnerable installations. The vulnerabilities, known as CVE-2023-1017 and CVE-2023-1018, allow an authenticated local attacker to modify protected data in the TPM firmware and execute code attacks. The CERT coordination center at Carnegie Mellon has issued an advisory with further details on these vulnerabilities.
From the CERT alert:
“An authenticated, local attacker could send maliciously crafted commands to a vulnerable TPM allowing access to sensitive data. In some cases, the attacker can also overwrite protected data in the TPM firmware. This may lead to a crash or arbitrary code execution within the TPM. Because the attacker’s payload runs within the TPM, it may be undetectable by other components of the target device.”
“An attacker who has access to a TPM-command interface can send maliciously-crafted commands to the module and trigger these vulnerabilities. This allows either read-only access to sensitive data or overwriting of normally protected data that is only available to the TPM (e.g., cryptographic keys),” the center added.
Francisco Falcon and Ivan Arce from Quarkslab are credited with discovering the security flaws and spearheading a coordinated vulnerability process across the industry prior to the public advisory released on Tuesday. The Trusted Computing Group (TCG), responsible for maintaining the TPM specification, has published an Errata that outlines the two memory corruption issues and offers guidance on mitigating them. The vulnerabilities are related to the way the TPM reference specification handles parameters included in TPM commands.
“An Out Of Bound (OOB) read vulnerability in the CryptParameterDecryption() routine allowed a 2-byte read access to data that was not part of the current session. It was also possible to write 2-bytes past the end of the current command buffer resulting in corruption of memory,” the center warned.
“An attacker with access to a device built with a vulnerable version of the TPM can trigger this bug by sending crafted commands to the TPM. The vulnerable TPM can thus be tricked to access data that is not part of the intended operation. As the OS relies on the TPM firmware for these functions, it may be difficult to detect or prevent such access using traditional host-based security capabilities,” it added.
This discovery has raised alarm bells because TPM technology is used in a variety of devices, from specialized enterprise-grade hardware to Internet of Things (IoT) appliances. With the growth of cloud computing and virtualization, software-based TPM implementations have also gained popularity.
The CERT coordination center is urging users to apply any updates provided by hardware and software manufacturers through their supply chain as soon as possible.
“Updating the firmware of TPM chips may be necessary, and this can be done through an OS vendor or the original equipment manufacturer (OEM). In some cases, the OEM may require resetting the TPM to its original factory default values as part of the update process,” the center added.
In high-assurance computing environments, users should consider using TPM Remote Attestation to detect any changes to devices and ensure their TPM is tamper-proof.
“As these attacks involve TPM-based software, mechanisms such as user-password or PIN protection and tpm-totp do not protect against attacks leveraging the [memory corruption] vulnerabilities,” according to the advisory.
Go to Source
Author: Ryan Naraine