Out-of-bounds Write Affecting zephyrproject-rtos/zephyr package, versions [,3.7.0-rc2)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-UNMANAGED-ZEPHYRPROJECTRTOSZEPHYR-8165332
  • published 8 Oct 2024
  • disclosed 4 Oct 2024
  • credit ekleezg

How to fix?

Upgrade zephyrproject-rtos/zephyr to version 3.7.0-rc2 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Write through the ascs_cp_rsp_add function due to an unchecked tailroom. An attacker can cause a buffer overflow and potentially execute arbitrary code or disrupt service by sending crafted input that exceeds the buffer limits.

PoC

  1. Set the CONFIG_BT_L2CAP_TX_MTU parameter to 253, which is the default value as defined in autoconf.h.

  2. Set the num_ases in the req to a value greater than 85, ensuring that the resulting size exceeds the capacity of rsp_buf, since 85×3>253.

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
5.3 medium
  • Attack Vector (AV)
    Adjacent
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    Low
  • Integrity (VI)
    Low
  • Availability (VA)
    Low
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None