CVE-2021-27502
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 · uneditedTexas Instruments TI-RTOS, when configured to use HeapMem heap(default), malloc returns a valid pointer to a small buffer on extremely large values, which can trigger an integer overflow vulnerability in 'HeapMem_allocUnprotected' and result in code execution.
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 · moderate confidenceThe TI-RTOS HeapMem heap implementation (the default) contains an integer overflow vulnerability in HeapMem_allocUnprotected. When malloc is called with extremely large allocation size values, the size validation fails due to integer wraparound, causing malloc to return a valid pointer to a much smaller buffer than requested. This heap corruption can lead to code execution.
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 dataall versions< 4.40.00< 4.40.00< 4.10.03all versionsall versionsCVSS 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
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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 checksWork through these to decide whether this CVE applies to you.
-
Identify the TI-RTOS or SDK version in useLocate the TI-RTOS package or SimpleLink SDK version in your project configuration files, build artifacts, or firmware image metadata. This may be in a manifest, README, or build system output.Affected if The version is TI-RTOS (any version), SimpleLink CC13xx/CC26xx SDK < 4.40.00, SimpleLink CC32xx SDK < 4.10.03, or SimpleLink MSP432E401Y/MSP432E411Y (any version)
-
Determine if HeapMem is the active heap implementationInspect your TI-RTOS configuration file (typically .cfg) for the heap setting. Look for statements like 'var HeapMem = ...' or 'Program.global.heap = HeapMem' or search for references to 'HeapMem' in your initialization code.Affected if HeapMem is configured as the default heap allocator (this is the default setting in TI-RTOS)
-
Inspect code for malloc calls with large size parametersSearch your application source code for malloc, calloc, or HeapMem_alloc calls. Review the size arguments passed to these functions, particularly any values that could be the result of arithmetic involving untrusted input or calculations.Affected if The application performs malloc/calloc with size values derived from user input, device inputs, or calculations that could result in extremely large (near-UINT32_MAX) values
-
Verify integer overflow protection in heap allocation pathsIf you have access to the TI-RTOS source code, review the HeapMem_allocUnprotected function in HeapMem.c. Check whether explicit size validation exists before the size addition that could wrap.Affected if No explicit check prevents size values that could cause integer overflow (e.g., size + headerSize > UINT32_MAX) before the allocation logic
You are affected if your firmware uses any version of TI-RTOS or a vulnerable SimpleLink SDK with HeapMem as the default heap, and your application can trigger malloc with extremely large size values.
Generated from the published advisory. Verify against your own configuration.
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 · scoped4.10.034.40.00
Replace the default HeapMem heap with a safer alternative such as HeapStd or HeapTrack, and add explicit size validation checks on all malloc/free calls to reject extremely large allocation requests before they reach the heap allocator. Apply any TI vendor patches if available.
SimpleLink CC13xx/CC26xx SDK >= 4.40.00; SimpleLink CC32xx SDK >= 4.10.03
- 1. Identify the specific TI-RTOS based project using the affected SDK versions
- 2. For Simplelink CC13xx/CC26xx projects: upgrade to SimpleLink SDK version 4.40.00 or later from TI's website
- 3. For Simplelink CC32xx projects: upgrade to SimpleLink SDK version 4.10.03 or later from TI's website
- 4. Rebuild the project with the updated SDK to include the HeapMem_allocUnprotected fix
- 5. Verify the integer overflow protection is included by reviewing release notes for the new SDK version
- 6. Re-flash the updated firmware to all affected devices
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA3.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,888.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2021-27502 — 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2021-27502 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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