GHSA-h963-7vhw-8rpx: Integer wraparound, under-allocation, and heap buffer overflow in Eclipse ThreadX NetX Duo __portable_aligned_alloc()

GHSA ID

GHSA‑h963‑7vhw‑8rpx

CVE ID

CVE‑2024‑2452

Severity

High

CVSS score

7.0 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L)

CWE

CWE-122, CWE-190

Published

2024‑03‑26

Last updated

2024‑03‑26

Affected packages

Package Vulnerable versions Patched versions

< 6.4.0

6.4.0

Description

Summary

In Eclipse ThreadX NetX Duo before 6.4.0, if an attacker can control parameters of __portable_aligned_alloc() could cause an integer wrap-around and an allocation smaller than expected. This could cause subsequent heap buffer overflows.

Details

If an attacker could control the size or alignment arguments to the __portable_aligned_alloc() function, they could cause an integer wraparound thus causing malloc() to allocate a small amount of memory, exposing to subsequent heap buffer overflows (AKA BadAlloc-style memory corruption).

The vulnerable code has been removed.