Advisory ID:
BRLY-DVA-2025-008

Multiple SMM memory corruption vulnerabilities in SMM module on Gigabyte device (SMRAM write)

July 9, 2025
Severity:
High
CVSS Score
8.2
Public Disclosure Date:
July 9, 2025
CVE ID:

Summary

BINARLY REsearch team has discovered multiple memory corruption vulnerabilities in Gigabyte device firmware that could allow a potential attacker to write fixed or predictable data to an attacker-controlled address.
Vendors Affected Icon

Vendors Affected

Gigabyte
AMI
Affected Products icon

Affected Products

Multiple

Potential Impact

An attacker could exploit this vulnerability to elevate privileges from ring 0 to ring -2 and execute arbitrary code in System Management Mode, an environment more privileged than and completely isolated from the operating system (OS). Running arbitrary code in SMM also bypasses SMM-based SPI flash protections against modification, which can help an attacker to install a firmware backdoor/implant. Such malicious code in the firmware could persist through operating system reinstallations. In addition, this vulnerability could potentially be used by malicious actors to bypass security mechanisms provided by UEFI firmware, such as Secure Boot and some types of memory isolation for hypervisors.

This vulnerability was detected by the Deep Vulnerability Analysis (DVA) component from Binarly Platform

Vulnerability Information

  • BINARLY internal vulnerability identifier: BRLY-DVA-2025-008
  • CERT/CC assigned CVE identifier: CVE-2025-7026
  • CVSS v3.1: 8.2 High AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Affected firmware with confirmed impact by BINARLY team

Device Version OEM IBV Name
GA-H110M-S2HP F22f (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
Z590 GAMING X F10 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
H510M S2H V2 F13 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
H510M S2H F17 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-S2V F26a (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-S2H F26g (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
H410M S2H V2 (rev. 1.9/2.1) FA (2024-07-03) Gigabyte AMI GenericComponentSmmEntry
H410M H V2 (rev. 1.9) FA (2024-07-09) Gigabyte AMI GenericComponentSmmEntry
GA-B150M-DS3H DDR3 F21f (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-S2V DDR3 F21e (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-S2 DDR3 F20g (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
H510M DS2 F15 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
G1.Sniper M7 F20h (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-B150-HD3P F24h (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-DS2 DDR3 F20g (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
Z390 AORUS PRO WIFI F13 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
Z390 AORUS PRO F13 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
Z490 AORUS MASTER F23 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
GA-H310TN-CM F17 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
H310M D3H F5 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
Z390 AORUS XTREME WATERFORCE F8 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
B360M D2V F16 (2024-01-10) Gigabyte AMI GenericComponentSmmEntry
B360M H F16 (2024-01-10) Gigabyte AMI GenericComponentSmmEntry
B360M GAMING HD F16 (2024-01-10) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-D3H F22f (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-D3H R2 TPM F22e (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-D3H R2 F24a (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
B360 AORUS GAMING 3 F16 (2024-01-10) Gigabyte AMI GenericComponentSmmEntry
B360 AORUS GAMING 3 WIFI F16 (2024-01-10) Gigabyte AMI GenericComponentSmmEntry
GA-B150-HD3 DDR3 F20h (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
H310M S2H F18 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
H310M DS2V F17 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
H310M S2H FQ (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
Z490 GAMING X AX F23 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
Z490 GAMING X F23 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
Z490 AORUS MASTER WATERFORCE F23 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
B460M H F5 (2024-01-04) Gigabyte AMI GenericComponentSmmEntry
B460M GAMING HD F7 (2024-01-04) Gigabyte AMI GenericComponentSmmEntry
GA-H110-D3A F26a (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
B560 HD3 F17 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
B460M DS3H AC F7 (2024-01-04) Gigabyte AMI GenericComponentSmmEntry
B460M AORUS PRO F8 (2024-01-04) Gigabyte AMI GenericComponentSmmEntry
H510M S2 F16 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
B560M H V2 F4 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
H510M DS2V F16 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
H510M H F19 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
Z490I AORUS ULTRA F23 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
GA-B150M-Gaming F20h (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
B360 HD3P F16 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-DS2 (rev. 1.0/1.1/1.2) F28b (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
H470M K F8 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H410M K FC (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H510M K V2 F3 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H510M S2H V3 F3 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H410M H V2 FC (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H410M S2 V2 FC (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H510M H V2 F3 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H510M S2 V2 F3 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H470M H F5 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
Z590 AORUS MASTER F10 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-DS2V DDR3 F22a (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-B150M-DS3H F22h (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
Z390 AORUS XTREME F10 (2024-01-11) Gigabyte AMI GenericComponentSmmEntry
H410M S2H V3 F9 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H410M DS2V V3 F9 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H410M S2 V3 F9 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
H410M H V3 F9 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
GA-H110M-DS2 FCa (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
GA-B150M-D2V F22f (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
Z490 VISION D F23 (2023-12-20) Gigabyte AMI GenericComponentSmmEntry
C621 AORUS XTREME F4b (2024-08-22) Gigabyte AMI GenericComponentSmmEntry
GA-H110TN-E F23f (2024-07-31) Gigabyte AMI GenericComponentSmmEntry
B360M DS3H F19 (2024-01-10) Gigabyte AMI GenericComponentSmmEntry
H410M S2H V2 F6 (2024-01-04) Gigabyte AMI GenericComponentSmmEntry
H410M DS2V V2 F5 (2024-01-04) Gigabyte AMI GenericComponentSmmEntry
H410M S2 V2 F5 (2024-01-04) Gigabyte AMI GenericComponentSmmEntry
H410M H V2 F5 (2024-01-04) Gigabyte AMI GenericComponentSmmEntry
H510M K F6 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
Z590 AORUS ELITE AX F10 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry
Z590 AORUS ELITE F8 (2023-12-19) Gigabyte AMI GenericComponentSmmEntry

Vulnerability description

Let's consider the module 5f42fc844985adaf4dcb21aeced55f40128e33ef454607f910cbedf7e9e08c4a.

The pseudocode of the vulnerable function at 0x179B8 is shown below (SwSmiInputValue: 0xB2):

EFI_STATUS __cdecl SwSmiHandler(
        EFI_HANDLE DispatchHandle,
        const void *Context,
        EFI_SMM_SW_CONTEXT *CommBuffer,
        UINTN *CommBufferSize)
{
  UINTN SwSmiCpuIndex;
  INT32 Result;
  UINT32 RbxRegister;
  UINT32 RcxRegister;
  UINTN Value;

  LODWORD(Value) = 0;
  if ( CommBuffer && CommBufferSize )
    SwSmiCpuIndex = CommBuffer->SwSmiCpuIndex;
  else
    SwSmiCpuIndex = Value;
  if ( SwSmiCpuIndex != -1 )
  {
    // 1. read buffer address in RbxRegister
    gEfiSmmCpuProtocol->ReadSaveState(
      gEfiSmmCpuProtocol,
      4,
      EFI_SMM_SAVE_STATE_REGISTER_RBX,
      SwSmiCpuIndex,
      &RbxRegister);

    // 2. read command in RcxRegister
    gEfiSmmCpuProtocol->ReadSaveState(
      gEfiSmmCpuProtocol,
      4,
      EFI_SMM_SAVE_STATE_REGISTER_RCX,
      SwSmiCpuIndex,
      &RcxRegister);

    if ( RcxRegister )
    {
      if ( RcxRegister != 1 )
      {
        LODWORD(Value) = 0x8004;
_WriteRbx:
        gEfiSmmCpuProtocol->WriteSaveState(
          gEfiSmmCpuProtocol,
          4,
          EFI_SMM_SAVE_STATE_REGISTER_RBX,
          SwSmiCpuIndex,
          &Value);
        return 0;
      }
      Result = CommandRcx1(RbxRegister);
    }
    else
    {
      // vulnerable function
      Result = CommandRcx0(RbxRegister);
    }
    LODWORD(Value) = Result;
    if ( (Result - 0x9001) <= 1 )
    {
      gEfiSmmCpuProtocol->WriteSaveState(
        gEfiSmmCpuProtocol,
        4,
        EFI_SMM_SAVE_STATE_REGISTER_RCX,
        SwSmiCpuIndex,
        &Value);
      LODWORD(Value) = 0xFFFF;
    }
    goto _WriteRbx;
  }
  return 0;
}

As we can see from the pseudocode, this handler defines the following logic:

  • read command from EFI_SMM_SAVE_STATE_REGISTER_RCX in RcxRegister variable
  • read buffer address from EFI_SMM_SAVE_STATE_REGISTER_RBX in RbxRegister variable
  • execute CommandRcx1 or CommandRcx0 depending on RcxRegister (command) value

The pseudocode of the CommandRcx0 function is shown below:

INT32 CommandRcx0(BIOS_SETTINGS_DATA_HEADER *RbxRegister)
{
  SetupDataSize = 0xD6C;
  ResultStatus = 0;
  if ( gRT->GetVariable(L"Setup", &EFI_SETUP_VARIABLE_GUID, 0, &SetupDataSize, SetupData) != EFI_SUCCESS )
    return 0x9001;
  GetSetupXtuBufferAddress(&SetupXtuBufferAddress);
  SetMem(Buffer, 0xBA, 0);
  CopyMem(Buffer, (SetupXtuBufferAddress + 12), 0xBA);
  ...
  if ( RbxRegister->Signature == '2DB$' )
  {
    Length = RbxRegister->Length;
    if ( Length == End )
    {
      if ( RbxRegister->MajorRev == 2 || !RbxRegister->MinorRev )
      {
        // SMRAM write
        RbxRegister->Count = Index;
        // SMRAM write
        sub_175D4(v11, RbxRegister);
        v10 = gGlobalStructureSmm;
        *(gGlobalStructureSmm + 0x61E8) = 4;
        *(v10 + 25056) = 8;
        sub_153D0(v10);
        return 0;
      }
      else
      {
        return 0x8006;
      }
    }
    else if ( Length >= 0xC )
    {
      // SMRAM write
      RbxRegister->Signature = '2DB$';
      *&RbxRegister->MajorRev = 2;
      RbxRegister->Length = End;
      RbxRegister->Count = Index;
      if ( Length >= End )
      {
        if ( Length > End )
        {
          ResultStatus = 2;
          // SMRAM write
          sub_175D4(v11, RbxRegister);
        }
        return ResultStatus;
      }
      else
      {
        return 0x8002;
      }
    }
    else
    {
      return 0x8003;
    }
  }
  else if ( RbxRegister->Signature == '$DB$' )
  {
    // SMRAM write
    RbxRegister->Length = End;
    Result = 1;
    RbxRegister->Signature = '2DB$';
    *&RbxRegister->MajorRev = 2;
    RbxRegister->Count = Index;
  }
  else
  {
    return 0x8001;
  }
  return Result;
}

RbxRegister is an attacker-controlled pointer and isn't validated. So writing to the RbxRegister buffer can cause SMRAM corruption if the buffer points to SMRAM or just before SMRAM. While the checks if ( RbxRegister->Signature == '2DB$' ) and if ( RbxRegister->Signature == '$DB$' ) make the vulnerability harder to exploit, they do not completely mitigate the vulnerability. For example, consider the scenario where the attacker writes code to one of the check locations (shown below), in this case, at 0x1775d:

.text:000000000001775B 81 3B 24 42 44 24               cmp     dword ptr [rbx], '$DB$'
.text:0000000000017761 74 0A                           jz      short loc_1776D
.text:0000000000017763 B8 01 80 00 00                  mov     eax, 8001h

Disclosure timeline

This vulnerability is subject to a 90 day disclosure period. After 90 days or when a patch has been made generally available (whichever comes first) the advisory will be publicly disclosed.

Disclosure Activity Date
CERT/CC is notified 2025-04-15
Gigabyte confirmed issue 2025-06-12
CERT/CC assigned CVE number 2025-07-02
BINARLY public disclosure date 2025-07-10

Acknowledgements

BINARLY REsearch team

Tags
AMI
Firmware
FWHunt
See if you are impacted now with our Firmware Vulnerability Scanner