Advisory ID:
BRLY-DVA-2024-012

[BRLY-DVA-2024-012] 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-012
  • 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
Inspiron 15 5576 Gaming 80fd3fc96653acfcad13dee7feb0b663140791ded24c18bcdcd329adf5ae980e 1.0.7 AMI DellDiagSmm 6983d90e-3ef7-4d09-8f36-63ae0c59cff2 6d8cce3c22200ce2a249eb99ae523e078fb7dc829d778c473434b871ed5becce SmmModule
Inspiron 15 5577 Gaming 857e55f7f0f052ad129dd12e971f63afe015123757d6e8508b2f0cb20bdc5a3e 1.1.3 AMI DellDiagSmm 6983d90e-3ef7-4d09-8f36-63ae0c59cff2 7960b155e87a49d9be867a0eec9ce9beeb1a99a0501ead408619cb9a143e7e3a SmmModule
Inspiron 15 7559 f048d8e235bd2b03f888882e4ec831caf8ea70d4cc9ebb9606f6cae63dc49d7a 1.3.1 AMI DellDiagSmm 6983d90e-3ef7-4d09-8f36-63ae0c59cff2 a4dd1f58f6e856d1528c08d98516e40594fbdc71fd6b4d40a1e074f686779a58 SmmModule
Vostro 14 5459 58ad1c2a1cc09823b57ca1e976fa2ef24d1a4572f187f589f9d51cc09c18992d 1.1.7 AMI DellDiagSmm 6983d90e-3ef7-4d09-8f36-63ae0c59cff2 cdb48f86112ff4b6b8cda61212a19a606cc88f52b91fd799755e1133e1296505 SmmModule

Vulnerability description

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

unsigned __int8 __fastcall sub_742C(_DWORD *a1)
{
  // [COLLAPSED LOCAL DECLARATIONS. PRESS NUMPAD "+" TO EXPAND]

  Guid.Data2 = 0x5A0;
  Guid.Data1 = 0xA602C5B;
  Guid.Data4[0] = 0x91;
  Guid.Data4[1] = 0x81;
  Guid.Data4[2] = 0xED;
  Guid.Data3 = 0x40C4;
  Guid.Data4[3] = 0xCD;
  Guid.Data4[4] = 0x89;
  Guid.Data4[5] = 0x1D;
  Guid.Data4[6] = 0;
  Guid.Data4[7] = 3;
  if ( !gDellGnvsPtr )
  {
    DataSize = 4;
    gRT_0->GetVariable(L"DELL_GNVS_PTR", &Guid, 0, &DataSize, &gDellGnvsPtr);
  }
  a1[6] = 0;
  a1[8] = 0;
  sub_5F58();
  __outbyte(0x380, 0x83);
  v3 = 897LL;
  v4 = __inbyte(0x381);
  if ( (v4 & 2) != 0 )
  {
    // ...
    *(gDellGnvsPtr + 4144) = 2;                 // unchecked write (SMRAM corruption)
  }
  else
  {
    sub_7334(a1);
    *(gDellGnvsPtr + 4144) = 1;                 // unchecked write (SMRAM corruption)
  }
  sub_5F58();
  __outbyte(0x380, 0x83);
  v8 = __inbyte(0x381);
  v9 = 65;
  if ( (v8 & 3) == 0 )
    v9 = 45;
  *(gDellGnvsPtr + 4146) = v9;                  // unchecked write (SMRAM corruption)
  sub_5F58();
  __outbyte(0x380, 0x83);
  v10 = 897;
  v11 = __inbyte(0x381);
  result = v11 & 3;
  if ( result )
    v13 = (result - 1) <= 2;
  else
    v13 = 0;
  v14 = gDellGnvsPtr;
  *(gDellGnvsPtr + 4145) = v13;                 // unchecked write (SMRAM corruption)
  v15 = (gDellGnvsPtr + 4144);
  if ( gDellGnvsPtr != -4144 )
  {
    LOBYTE(v10) = 2;
    LOBYTE(v14) = -82;
    sub_5F94(v14, v10);
    __outbyte(0x380, 0x83);
    result = __inbyte(0x381);
    if ( result == 1 )
    {
      *v15 = 1;
    }
    else if ( result == 2 )
    {
      *v15 = 2;
    }
  }
  a1[5] = 0;
  return result;
}

The GetVariable call initializes gDellGnvsPtr 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 multiple arbitrary write operations.

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