GHSA-67ww-q8x2-g487: Module Manager loaders leave the manager mutex held when a module preamble’s sizes overflow, blocking every later module operation

GHSA ID

GHSA‑67ww‑q8x2‑g487

CVE ID

CVE‑2026‑118052

Severity

Medium

CWE

CWE-667, CWE-833

Published

2026‑11‑01

Last updated

2026‑11‑01

Affected packages

Package Vulnerable versions Patched versions

ThreadX

>= 6.0.1, ⇐ 6.5.2.202603

6.5.2.202603b

Description

Summary

When a module’s preamble declares a data size or a stack size close to the maximum of a ULONG, the Module Manager’s loaders detect the arithmetic overflow and return TXM_MODULE_MATH_OVERFLOW, but leave the Module Manager’s protection mutex held. Every later Module Manager operation from any other thread — loading, unloading, starting or stopping a module, and the manager services that take the same mutex — then blocks indefinitely.

Details

_txm_module_manager_internal_load(), used by txm_module_manager_in_place_load() and txm_module_manager_memory_load(), and _txm_module_manager_absolute_load_extended(), used by both absolute loaders, take _txm_module_manager_mutex and then compute the module’s data allocation from the preamble’s data size, start/stop stack size and callback stack size. They add these with TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG, which on overflow returns TXM_MODULE_MATH_OVERFLOW from the enclosing function directly. Every other error path in these functions releases the mutex first; this one does not. The calling thread therefore returns still owning the mutex, and any other thread that later requests it waits forever.

Impact

A module image whose preamble carries an oversized data or stack size permanently disables the Module Manager for every thread except the one that attempted the load: no module can be loaded, started, stopped or unloaded until the system is reset. Nothing is read or written out of bounds. The trigger is a field of the module image, so the attacker is whoever controls a module the device loads.

Affected configurations

Systems that use the Module Manager and load module images through txm_module_manager_in_place_load(), txm_module_manager_memory_load(), txm_module_manager_absolute_load() or txm_module_manager_absolute_load_extended(), on every module port. txm_module_manager_file_load() reaches the same code through _txm_module_manager_internal_load() once the file has been read.

Affected versions: [6.0.1, 6.5.2.202603].

Severity

CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N, CVSS-B 6.8 (Medium). CWE-667, CWE-833.

Patches

Fixed in ThreadX 6.5.2.202603b. The overflow paths in _txm_module_manager_internal_load() and _txm_module_manager_absolute_load_extended() now release the Module Manager mutex before returning, and the loaders validate the preamble’s sizes before computing the allocation. A new regression test checks that every refused load leaves the mutex free, and fails without the fix.

Credits

Found by Frédéric Desbiens while working on another Module Manager report.