Advisory ID:
BRLY-DVA-2024-022

[BRLY-DVA-2024-022] SMM memory corruption vulnerability in SMM module on Dell device (SMRAM write).

April 4, 2025
Severity:
High
CVSS Score
8.2
Public Disclosure Date:
April 4, 2025
CVE ID:

Summary

BINARLY REsearch team has discovered a SMM memory corruption vulnerability in a Dell device allowing a possible attacker to write fixed or predictable data to SMRAM. Exploiting this issue could lead to escalating privileges to SMM.
Vendors Affected Icon

Vendors Affected

Dell
Affected Products icon

Affected Products

No items found.

Potential Impact

An attacker can exploit this vulnerability to elevate privileges from ring 0 to ring -2, execute arbitrary code in System Management Mode - an environment more privileged than operating system (OS) and completely isolated from it. Running arbitrary code in SMM additionally bypasses SMM-based SPI flash protections against modifications, which can help an attacker to install a firmware backdoor/implant into BIOS. Such a malicious firmware code in BIOS could persist across operating system re-installs. Additionally, this vulnerability potentially could be used by malicious actors to bypass security mechanisms provided by UEFI firmware (for example, 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-2024-022
  • Dell PSIRT assigned CVE identifier: CVE-2024-32858/CVE-2024-32859
  • DSA identifier: DSA-2024-124
  • CVSS v3.1: 8.2 High AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Affected Dell firmware with confirmed impact by BINARLY team

Device Name Unpacked Firmware SHA256 Firmware Version IBV Module Name Module GUID Module SHA256 Module Kind
Alienware 13 R3 cb25317443d65ba126174c8b7547c7d2f6c0288f859e2063436eb7b350d9bf62 1.18.0 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 e5cdd6bb5ecbb12c7a591bb252e8edeb27c16dc4825f8f4ebbf498e6878e437d SmmModule
Alienware 15 R3 and 17 R4 d4ed519bd5e5ba2f027d00635494d485f19f3080d8baf6d711b190323294e216 1.18.0 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 bec99efa166b461af409ddc0ce1acd0c9422d87e5a88e0c14846e7d0220a6b75 SmmModule
Alienware 17 R5 608e410d1c0475dac58b1e8f36b477aa8d9e9f28d30ec89d44b550e36bbbaf47 1.20.0 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 e10652b013caa21a81c533b663afaa147ee03f987f103b775d54bf388a0bc7f6 SmmModule
Alienware Area 51m R2 cf79e46aefb1846f4267dff93714bedfa1b445695e7135d3df944639fac22df7 1.25.0 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 49b1db6c889c7144815173c507899f855e2a214776e08579c4ebb9d4e8662e2b SmmModule
Alienware Aurora R10 1e18a9afcdd25d86e56331b2eb028866d8b112d0db10bbe2af02575be15c3ba7 2.8.0 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 06ae6fafa904499cc821e70f162727be5814812a5660ffb16e6e1ad7f653f6e8 SmmModule
Alienware Aurora R15 AMD fd331f58aa871b8c66bdf0bc51f36b1ae6274069ae10982e154bef6776449f0d 1.10.1 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 3d54cf40afc7cf5efdb2e0b81b495d66bc255be00c6d083f4e75e36f0906576e SmmModule
Alienware Aurora R15 f2587b2f84c7c8c9eb1e1f116b2b4b6813e4c44b0c83109921020aed4b946393 1.11.0 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 9c3b98d82ea476f1def7b2ee1433dd3ef9f2afe4aae753eb93664a33aa841635 SmmModule
Alienware Aurora R5 fbe05a08347cbdb98f0679a35f293947b323d9af454af284ae3f8fe5f43fce19 1.0.23 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 98c23b9ccae3c7da32af20223818da5de601d2fa0fcb8c02c947e3a62ef5bcb3 SmmModule
Alienware Aurora R6 31f5fb1f46fdaf3bbbd39f01b43874a1bb4c6f37aac0d59807eeab27abbfe147 1.0.23 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 0aadb3a46177a8d028350a1fa7234f5c64130db50fa17d6eff1531f8fd155476 SmmModule
Alienware Aurora R7 5fa1ef5c894df5e90b1b06eac4ff18ce8a7f87fbc18a1ca25da3e7b3c10c7056 1.0.26 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 849124780df821a99a407bb1464b3c9185cf690a03c1906e2ef5f3fe3770bbbd SmmModule
Alienware m15 R3 10698d72cf17eb875a48f3ca4480dea64a98faa83db6a822ac8487d2cd322661 1.26.0 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 f3bbc811db92338a0d9462a8e952d3e6bc253146be805778d9a1ae13ba94896d SmmModule
Alienware m15 R4 5dfd1ca5cfe59a0e87d06539d0a1bd9ff30005d5ab4b9b7a18c439194c81ec59 1.20.0 AMI DellDaCallingInterfaceSmm f3d0cc88-1bd3-4efe-9294-423bb495f6c6 c33c26307ac00f14e69dfe889e008aeead0bd15de09d4bc7d96ae52df46fb4ca SmmModule

For supported affected platforms, Dell has addressed this vulnerability in DSA-2024-124. All other affected platforms have been determined to be End of Support Life.

Vulnerability description

Let's consider the vulnerability on the example of a module with SHA256 e5cdd6bb5ecbb12c7a591bb252e8edeb27c16dc4825f8f4ebbf498e6878e437d. The pseudocode of the vulnerable function is presented below:

EFI_STATUS __fastcall SwSmiHandler(
        EFI_HANDLE DispatchHandle,
        const void *Context,
        UINTN *CommBuffer,
        UINTN *CommBufferSize)
{
  UINTN Index; // r9
  __int64 v5; // rbx
  unsigned __int64 ControllablePtr; // rdi
  _DWORD *Ptr; // r11
  __int16 v8; // ax
  __int64 v9; // rcx
  EFI_GUID VendorGuid; // [rsp+30h] [rbp-228h] BYREF
  UINTN DataSize; // [rsp+40h] [rbp-218h] BYREF
  int RbxValue[11]; // [rsp+22Ch] [rbp-2Ch] BYREF
  _DWORD *DellGnvsPtr; // [rsp+270h] [rbp+18h] BYREF

  Index = *CommBuffer;
  v5 = 0;
  VendorGuid.Data2 = 0x5A0;
  VendorGuid.Data3 = 0x40C4;
  DellGnvsPtr = 0;
  VendorGuid.Data1 = 0xA602C5B;
  VendorGuid.Data4[0] = 0x91;
  VendorGuid.Data4[1] = 0x81;
  VendorGuid.Data4[2] = 0xED;
  VendorGuid.Data4[3] = 0xCD;
  VendorGuid.Data4[4] = 0x89;
  VendorGuid.Data4[5] = 0x1D;
  VendorGuid.Data4[6] = 0;
  VendorGuid.Data4[7] = 3;
  gEfiSmmCpuProtocol->ReadSaveState(gEfiSmmCpuProtocol, 4, EFI_SMM_SAVE_STATE_REGISTER_RBX, Index, RbxValue);
  ControllablePtr = RbxValue[0];
  DataSize = 4;
  gRT_0->GetVariable(L"DELL_GNVS_PTR", &VendorGuid, 0, &DataSize, &DellGnvsPtr);
  Ptr = DellGnvsPtr;
  if ( *DellGnvsPtr == 'TESQ' )
  {
    ControllablePtr = (DellGnvsPtr + 2);
    *DellGnvsPtr = 0;                           // unchecked write (SMRAM corruption)
    Ptr = DellGnvsPtr;
  }
  if ( *Ptr == 'DESQ' )
  {
    ControllablePtr = (Ptr + 2);
    *Ptr = 0;                                   // unchecked write (SMRAM corruption)
  }
  v8 = gFuncTable[0];
  if ( gFuncTable[0] != 255 )
  {
    v9 = 0;
    while ( v8 != *ControllablePtr || gFuncTable[v9 + 1] != *(ControllablePtr + 2) )
    {
      ++v5;
      v9 = 6 * v5;
      v8 = gFuncTable[6 * v5];
      if ( v8 == 255 )
        return 0;
    }
    // multiple unchecked writes (SMRAM corruption) in functions from gFuncTable
    (*&gFuncTable[6 * v5 + 2])(ControllablePtr);
  }
  return 0;
}

The GetVariable call initializes DellGnvsPtr with the value stored in the DELL_GNVS_PTR NVRAM variable. Since the DELL_GNVS_PTR NVRAM variable is controlled by an attacker, they can perform an arbitrary write operation here:

*DellGnvsPtr = 0;                           // unchecked write (SMRAM corruption)
...
*Ptr = 0;                                   // unchecked write (SMRAM corruption)

It must be noted that these write can be reached only if DellGnvsPtr points to the signatures DESQ or TESQ, thus limiting the memory locations that can be corrupted by an attacker. However, an attacker can overwrite these signatures during the first run of the SMI handler (by pointing to the code with signatures), then obtain a more powerful write primitive in one of the functions from the gFuncTable. For example in the sub_7268 function from the gFuncTable:

__int64 __fastcall sub_7268(_DWORD *ControllablePtr)
{
  __int64 result; // rax

  result = 0;
  ControllablePtr[6] = 0;
  ControllablePtr[7] = 0;
  ControllablePtr[5] = 0;
  return result;
}

In order to fix this vulnerability, all user-controllable offsets and pointers should be checked with SmmIsBufferOutsideSmmValid() or analogues before any write attempt.

Disclosure timeline

This bug is subject to a 90 day disclosure deadline. After 90 days elapsed or a patch has been made broadly available (whichever is earlier), the bug report will become visible to the public.

Disclosure Activity Date
Dell PSIRT is notified 2024-06-18
Dell PSIRT is confirmed issue 2024-08-21
BINARLY public disclosure date 2025-04-04

Acknowledgements

BINARLY REsearch team

Tags
No items found.
FWHunt
See if you are impacted now with our Firmware Vulnerability Scanner