Classic Buffer OverflowWeakness · CWE-120

CVE-2024-40568

CRITICAL · 9.8 CVSS v3.1 Published 2024-09-18
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges 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
Buffer Overflow vulnerability in btstack mesh commit before v.864e2f2b6b7878c8fab3cf5ee84ae566e3380c58 allows a remote attacker to execute arbitrary code via the pb_adv_handle_tranaction_cont function in the src/mesh/pb_adv.c component

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 confidence

A buffer overflow vulnerability exists in the btstack mesh implementation in the pb_adv_handle_tranaction_cont function in src/mesh/pb_adv.c. This flaw allows a remote attacker to execute arbitrary code via the protobuf ADV handling path, potentially leading to complete system compromise.

MitigationUpgrade btstack to commit v.864e2f2b6b7878c8fab3cf5ee84ae566e3380c58 or later. If upgrading is not immediately feasible, restrict network exposure of Bluetooth mesh interfaces and implement input validation on pb_adv_handle_tranaction_cont inputs.

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

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
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/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 checks

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

  1. Confirm btstack is in use
    Search for btstack source files or binaries in your environment: find / -name 'btstack*' 2>/dev/null or check dependency lists for btstack libraries
    Affected if btstack library or source code is present in the system
  2. Identify btstack version
    Check the git commit hash of the btstack installation: git -C /path/to/btstack log -1 --format=%H or look for version tags in headers/packaging
    Affected if The version cannot be determined or is earlier than commit 864e2f2b6b7878c8fab3cf5ee84ae566e3380c58
  3. Verify mesh functionality is enabled
    Examine build configuration files (Makefile, CMakeLists.txt, Kconfig, or .pro file) for mesh-related flags such as ENABLE_BTSTACK_MESH, BTSTACK_MESH, or similar mesh compile-time options
    Affected if Mesh support is compiled into the firmware or application
  4. Check for pb_adv handling code
    Inspect the btstack source tree for src/mesh/pb_adv.c and verify the pb_adv_handle_tranaction_cont function exists in the codebase
    Affected if The vulnerable pb_adv.c file with the overflow function is present in the build
  5. Compare version to fixed commit
    Run: git -C /path/to/btstack rev-parse 864e2f2b6b7878c8fab3cf5ee84ae566e3380c58 to check if the fix commit exists, then compare your current HEAD to it using git log --oneline HEAD..864e2f2b6b7878c8fab3cf5ee84ae566e3380c58
    Affected if Your btstack HEAD commit precedes the fixed commit (command returns commits, meaning your version is older)

You are affected if btstack with mesh support is in use and the btstack version is older than commit 864e2f2b6b7878c8fab3cf5ee84ae566e3380c58.

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
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade btstack to commit v.864e2f2b6b7878c8fab3cf5ee84ae566e3380c58 or later. If upgrading is not immediately feasible, restrict network exposure of Bluetooth mesh interfaces and implement input validation on pb_adv_handle_tranaction_cont inputs.

Recommended fix Moderate confidence

Commit 864e2f2b6b7878c8fab3cf5ee84ae566e3380c58 or any subsequent release version containing this fix

  1. Identify the current btstack version or commit hash in use by reviewing project dependencies or git history
  2. Locate the src/mesh/pb_adv.c file in the codebase
  3. Verify the pb_adv_handle_tranaction_cont function contains the buffer overflow vulnerability (check for missing bounds checking before commit 864e2f2b6b7878c8fab3cf5ee84ae566e3380c58)
  4. Update btstack to commit 864e2f2b6b7878c8fab3cf5ee84ae566e3380c58 or a later release version that includes this fix: run 'git fetch origin' followed by 'git checkout 864e2f2b6b7878c8fab3cf5ee84ae566e3380c58' or merge the fix commit into the current branch
  5. Rebuild the btstack mesh component and the entire application to incorporate the security fix
  6. Redeploy the updated firmware/software to all affected devices
  7. Verify the fix is applied by confirming the new commit is active and test the mesh functionality for regressions
Caveat Unknown - assume minimal as this is a targeted security fix; however, test thoroughly for any mesh functionality regressions

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

Have this fixed Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing16.0 h
  • Review / QA4.0 h
32.0 hours of engineering $5,360
Get help mitigating

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-40568 — 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-2024-40568 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