ThreadxApplication · Eclipse

CVE-2026-0648

MEDIUM · 6.3 CVSS v3.1 Published 2026-01-27
Fix available
A fix is available. Upgrade to 6.4.5 or later.
See remediation →
65/100
Remediation priority · Elevated
Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
The vulnerability stems from an incorrect error-checking logic in the CreateCounter() function (in threadx/utility/rtos_compatibility_layers/OSEK/tx_osek.c) when handling the return value of osek_get_counter(). Specifically, the current code checks if cntr_id equals 0u to determine failure, but @osek_get_counter() actually returns E_OS_SYS_STACK (defined as 12U) when it fails. This mismatch causes the error branch to never execute even when the counter pool is exhausted. As a result, when the counter pool is depleted, the code proceeds to cast the error code (12U) to a pointer (OSEK_COUNTER *), creating a wild pointer. Subsequent writes to members of this pointer lead to writes to illegal memory addresses (e.g., 0x0000000C), which can trigger immediate HardFaults or silent memory corruption. This vulnerability poses significant risks, including potential denial-of-service attacks (via repeated calls to exhaust the counter pool) and unauthorized memory access.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The CreateCounter() function in ThreadX's OSEK compatibility layer incorrectly checks for failure by testing if cntr_id equals 0, but osek_get_counter() returns E_OS_SYS_STACK (12U) on failure. When the counter pool is exhausted, the error code 12U is cast to an OSEK_COUNTER pointer, creating a wild pointer to address 0x0000000C. Subsequent member writes cause HardFaults or silent memory corruption.

MitigationModify the error-checking logic in CreateCounter() to check for E_OS_SYS_STACK (12U) instead of 0 when evaluating the return value from osek_get_counter(), and ensure proper error handling branches execute on failure.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
ThreadxApplication
Affected:>= 6.1.7, < 6.4.5

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
High
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify ThreadX version
    Locate the ThreadX version in your build system, header files (tx_version.h or similar), or firmware metadata. Common paths: include/tx/tx_version.h, third_party/threadx/version.h, or check the binary string table.
    Affected if Version is >= 6.1.7 AND < 6.4.5
  2. Verify OSEK compatibility layer is enabled
    Check if the OSEK/OS abstraction layer is compiled into your ThreadX build. Look for compilation of osek_*.c files, or presence of TX_OSEK or TX_OSEK_API defined in your build configuration.
    Affected if OSEK compatibility layer is present in the build
  3. Confirm CreateCounter usage
    Search your application code for calls to CreateCounter() function from the OSEK API, or trace calls to osek_get_counter() which underlies it. Check call graphs or decompiled binary for these symbols.
    Affected if CreateCounter() from OSEK layer is being called by your application
  4. Check counter pool exhaustion risk
    Review the maximum counter configuration (OSEK_COUNTERS or TXM_OSEK_COUNTERS define) and the number of counters created at runtime. If counters are created dynamically without bound, the pool may be exhaustible.
    Affected if Counter pool can be exhausted (unbounded dynamic creation or pool size equals created count)
  5. Inspect error handling path
    Examine the CreateCounter() implementation in your ThreadX source or disassembly. Check if it tests for return value == 0 instead of return value == 12 (E_OS_SYS_STACK) after calling osek_get_counter().
    Affected if Error check tests for 0 rather than 12U (E_OS_SYS_STACK)

You are affected if running Eclipse ThreadX version 6.1.7 through 6.4.4 with the OSEK compatibility layer enabled and using CreateCounter(), where the incorrect error check can cause a wild pointer when the counter pool is exhausted.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 6.4.5 or later
Fixed in 6.4.5
Interim mitigation

Modify the error-checking logic in CreateCounter() to check for E_OS_SYS_STACK (12U) instead of 0 when evaluating the return value from osek_get_counter(), and ensure proper error handling branches execute on failure.

Recommended fix High confidence

ThreadX 6.4.5 or later

  1. 1. Navigate to the ThreadX GitHub repository (github.com/azure-rtos/threadx)
  2. 2. Download or clone ThreadX version 6.4.5 or later
  3. 3. Replace the affected file threadx/utility/rtos_compatibility_layers/OSEK/tx_osek.c with the version from the updated release
  4. 4. Rebuild the ThreadX library with the updated source code
  5. 5. Rebuild your application to link against the fixed library
  6. 6. Test thoroughly to verify the counter creation error handling now works correctly (osek_get_counter failure returns 12U and triggers proper error branch)

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Threadx Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing3.0 h
  • Review / QA1.0 h
7.0 hours of engineering $1,210
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,936.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-0648 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-0648 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data