CVE Vulnerabilities

CVE-2020-15706

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Published: Jul 29, 2020 | Modified: Nov 21, 2024
CVSS 3.x
6.4
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
4.4 MEDIUM
AV:L/AC:M/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
6.4 MODERATE
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Ubuntu
HIGH
root.io logo minimus.io logo echo.ai logo

GRUB2 contains a race condition in grub_script_function_create() leading to a use-after-free vulnerability which can be triggered by redefining a function whilst the same function is already executing, leading to arbitrary code execution and secure boot restriction bypass. This issue affects GRUB2 version 2.04 and prior versions.

Weakness

The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.

Affected Software

NameVendorStart VersionEnd Version
Grub2Gnu*2.04 (including)
Red Hat Enterprise Linux 7RedHatfwupdate-0:12-6.el7_8*
Red Hat Enterprise Linux 7RedHatgrub2-1:2.02-0.86.el7_8*
Red Hat Enterprise Linux 7RedHatshim-0:15-7.el7_9*
Red Hat Enterprise Linux 7RedHatshim-signed-0:15-7.el7_8*
Red Hat Enterprise Linux 7.2 Advanced Update SupportRedHatgrub2-1:2.02-0.86.el7_2*
Red Hat Enterprise Linux 7.2 Advanced Update SupportRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.2 Advanced Update SupportRedHatshim-signed-0:15-8.el7_2*
Red Hat Enterprise Linux 7.3 Advanced Update SupportRedHatgrub2-1:2.02-0.86.el7*
Red Hat Enterprise Linux 7.3 Advanced Update SupportRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.3 Advanced Update SupportRedHatshim-signed-0:15-8.el7_3*
Red Hat Enterprise Linux 7.3 Telco Extended Update SupportRedHatgrub2-1:2.02-0.86.el7*
Red Hat Enterprise Linux 7.3 Telco Extended Update SupportRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.3 Telco Extended Update SupportRedHatshim-signed-0:15-8.el7_3*
Red Hat Enterprise Linux 7.3 Update Services for SAP SolutionsRedHatgrub2-1:2.02-0.86.el7*
Red Hat Enterprise Linux 7.3 Update Services for SAP SolutionsRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.3 Update Services for SAP SolutionsRedHatshim-signed-0:15-8.el7_3*
Red Hat Enterprise Linux 7.4 Advanced Update SupportRedHatfwupdate-0:9-10.el7_4*
Red Hat Enterprise Linux 7.4 Advanced Update SupportRedHatgrub2-1:2.02-0.86.el7_4*
Red Hat Enterprise Linux 7.4 Advanced Update SupportRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.4 Advanced Update SupportRedHatshim-signed-0:15-8.el7_4*
Red Hat Enterprise Linux 7.4 Telco Extended Update SupportRedHatfwupdate-0:9-10.el7_4*
Red Hat Enterprise Linux 7.4 Telco Extended Update SupportRedHatgrub2-1:2.02-0.86.el7_4*
Red Hat Enterprise Linux 7.4 Telco Extended Update SupportRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.4 Telco Extended Update SupportRedHatshim-signed-0:15-8.el7_4*
Red Hat Enterprise Linux 7.4 Update Services for SAP SolutionsRedHatfwupdate-0:9-10.el7_4*
Red Hat Enterprise Linux 7.4 Update Services for SAP SolutionsRedHatgrub2-1:2.02-0.86.el7_4*
Red Hat Enterprise Linux 7.4 Update Services for SAP SolutionsRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.4 Update Services for SAP SolutionsRedHatshim-signed-0:15-8.el7_4*
Red Hat Enterprise Linux 7.6 Extended Update SupportRedHatfwupdate-0:12-6.el7_6*
Red Hat Enterprise Linux 7.6 Extended Update SupportRedHatgrub2-1:2.02-0.86.el7_6*
Red Hat Enterprise Linux 7.6 Extended Update SupportRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.6 Extended Update SupportRedHatshim-signed-0:15-8.el7_6*
Red Hat Enterprise Linux 7.7 Extended Update SupportRedHatfwupdate-0:12-6.el7_7*
Red Hat Enterprise Linux 7.7 Extended Update SupportRedHatgrub2-1:2.02-0.86.el7_7*
Red Hat Enterprise Linux 7.7 Extended Update SupportRedHatshim-0:15-8.el7*
Red Hat Enterprise Linux 7.7 Extended Update SupportRedHatshim-signed-0:15-8.el7_7*
Red Hat Enterprise Linux 8RedHatfwupd-0:1.1.4-7.el8_2*
Red Hat Enterprise Linux 8RedHatgrub2-1:2.02-87.el8_2*
Red Hat Enterprise Linux 8RedHatshim-0:15-14.el8_2*
Red Hat Enterprise Linux 8RedHatshim-unsigned-x64-0:15-7.el8*
Red Hat Enterprise Linux 8.0 Update Services for SAP SolutionsRedHatfwupd-0:1.1.4-2.el8_0*
Red Hat Enterprise Linux 8.0 Update Services for SAP SolutionsRedHatgrub2-1:2.02-87.el8_0*
Red Hat Enterprise Linux 8.0 Update Services for SAP SolutionsRedHatshim-0:15-14.el8_0*
Red Hat Enterprise Linux 8.1 Extended Update SupportRedHatfwupd-0:1.1.4-2.el8_1*
Red Hat Enterprise Linux 8.1 Extended Update SupportRedHatgrub2-1:2.02-87.el8_1*
Red Hat Enterprise Linux 8.1 Extended Update SupportRedHatshim-0:15-14.el8_1*
Red Hat Enterprise Linux 8.1 Extended Update SupportRedHatshim-unsigned-x64-0:15-7.el8*
Grub2Ubuntubionic*
Grub2Ubuntuesm-infra-legacy/trusty*
Grub2Ubuntuesm-infra/bionic*
Grub2Ubuntuesm-infra/focal*
Grub2Ubuntuesm-infra/xenial*
Grub2Ubuntufocal*
Grub2Ubuntuprecise/esm*
Grub2Ubuntutrusty*
Grub2Ubuntutrusty/esm*
Grub2Ubuntuxenial*
Grub2-signedUbuntubionic*
Grub2-signedUbuntuesm-infra-legacy/trusty*
Grub2-signedUbuntuesm-infra/bionic*
Grub2-signedUbuntuesm-infra/focal*
Grub2-signedUbuntuesm-infra/xenial*
Grub2-signedUbuntufocal*
Grub2-signedUbuntutrusty*
Grub2-signedUbuntutrusty/esm*
Grub2-signedUbuntuxenial*
Grub2-unsignedUbuntuesm-infra/xenial*
Grub2-unsignedUbuntutrusty*
Grub2-unsignedUbuntuxenial*

Extended Description

A race condition occurs within concurrent environments, and it is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related:

A race condition exists when an “interfering code sequence” can still access the shared resource, violating exclusivity. The interfering code sequence could be “trusted” or “untrusted.” A trusted interfering code sequence occurs within the product; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable product.

Potential Mitigations

  • Minimize the usage of shared resources in order to remove as much complexity as possible from the control flow and to reduce the likelihood of unexpected conditions occurring.
  • Additionally, this will minimize the amount of synchronization necessary and may even help to reduce the likelihood of a denial of service where an attacker may be able to repeatedly trigger a critical section (CWE-400).

References