SecurityContext

CVE-2024-48981: MBed OS - Buffer Overflow

  • Cve: CVE-2024-48981
  • Name: MBed OS - Buffer Overflow
  • Description: An issue was discovered in MBed OS 6.16.0. During processing of HCI packets, the software dynamically determines the length of the packet header by looking up the identifying first byte and matching it against a table of possible lengths. The initial parsing function, hciTrSerialRxIncoming does not drop packets with invalid identifiers but also does not set a safe default for the length of unknown packets' headers, leading to a buffer overflow. This can be leveraged into an arbitrary write by an attacker. It is possible to overwrite the pointer to a not-yet-allocated buffer that is supposed to receive the contents of the packet body. One can then overwrite the state variable used by the function to determine which state of packet parsing is currently occurring. Because the buffer is allocated when the last byte of the header has been copied, the combination of having a bad header length variable that will never match the counter variable and being able to overwrite the state variable with the resulting buffer overflow can be used to advance the function to the next step while skipping the buffer allocation and resulting pointer write. The next 16 bytes from the packet body are then written wherever the corrupted data pointer is pointing.
  • Impact: Attackers can overwrite memory arbitrarily, potentially leading to code execution or system instability.
  • Remediation: Update to the latest version of MBed OS that addresses this vulnerability or apply available patches.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: data_tampering, remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.5
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Epss score: 0.00356
  • Epss percentile: 0.29707
  • Assignee: [email protected]
  • Published at: 2024-11-20T20:15:19Z
  • Age in days: 734
  • Modified at: 2026-06-17T07:59:08Z
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-48981
  • Nvd status: modified
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-120Buffer Copy without Checking Size of Input

References

UrlSourceTags
https://github.com/mbed-ce/mbed-os/pull/374nvdIssue Tracking, Vendor Advisory
https://github.com/mbed-ce/mbed-os/blob/54e8693ef4ff7e025018094f290a1d5cf380941f/connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c#L161nvdProduct

Products

ProductAffectedPlatform boundSourcesUrl
arm:mbed= 6.16.0nonvd/v1/products/arm/mbed

Projects

RepositoryLink kindsIndexedUrl
mbed-ce/mbed-osfix, pullyes/v1/repositories/mbed-ce/mbed-os

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts