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. Learn more

Threat Intelligence

EPSS
0.04% (15th 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 IDSNYK-UNMANAGED-ZEPHYRPROJECTRTOSZEPHYR-8165332
  • published8 Oct 2024
  • disclosed4 Oct 2024
  • creditekleezg

Introduced: 4 Oct 2024

CVE-2024-6442  (opens in a new tab)
CWE-787  (opens in a new tab)

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