Description
Capstone is a disassembly framework. In 6.0.0-Alpha9 and earlier, Capstone's arch/SH/SHDisassembler.c SH floating-point decoders such as opFADD, opFMUL, and opFSUB call set_reg() and set_reg_n() using sh_info.op.op_count without checking the fixed-size operands[] array. Repeated crafted instructions processed through cs_disasm_iter() or cs_disasm() with CS_ARCH_SH, CS_MODE_SH2A or CS_MODE_SH4A, CS_MODE_SHFPU, and CS_OPT_DETAIL can increment the operand count beyond the 176-byte sh_info allocation and perform a four-byte heap buffer overflow write. The corruption can crash the process and may enable code execution depending on heap layout. This issue is fixed in version 6.0.0-Alpha10.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| capstone-engine | capstone | < 6.0.0-Alpha10 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | capstone | No fix yet | — |
| Debian 13 | capstone | No fix yet | — |
| Debian 12 | capstone | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | capstone | No fix yet | — |
| Ubuntu 26.04 LTS | capstone | No fix yet | — |
| Ubuntu 24.04 LTS | capstone | No fix yet | — |
| Ubuntu 22.04 LTS | capstone | No fix yet | — |
| Ubuntu 20.04 LTS | capstone | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | capstone | No fix yet | — |
| Ubuntu 16.04 LTS | capstone | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Hardened Images 1 | capstone +4 | 5.0.8-0.3.hum1 | RHSA-2026:59419 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | capstone | No fix yet | — |
| Azure Linux 3 | rust | 1.96.1-1 | — |
Advisories 1
- RHSA-2026:59419 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 17, 2026
References
- https://github.com/capstone-engine/capstone/security/advisories/GHSA-3hpv-wr3j-rxwh
- https://github.com/capstone-engine/capstone/pull/2968
- https://github.com/capstone-engine/capstone/pull/2969
- https://github.com/capstone-engine/capstone/commit/09e76802380b9e94d9720c44458d9d5282219e7e
- https://github.com/capstone-engine/capstone/commit/e17ee44a8307ea33375b4727ac4f987650bf7bed
- https://github.com/capstone-engine/capstone/releases/tag/6.0.0-Alpha10