Bochs Stack-Based Buffer Overflow Vulnerability Allowing Arbitrary Code Execution

Vulnerability

A stack-based buffer overflow vulnerability has been identified in Bochs versions 2.6 through 5. This vulnerability allows attackers to execute arbitrary code by sending an oversized input string to the application. Exploitation involves crafting a payload with 1200 bytes of padding followed by a return-oriented programming (ROP) chain, which overwrites the instruction pointer. This manipulation enables the execution of shell commands with the privileges of the application.

Impact

Exploitation of this vulnerability leads to a stack-based buffer overflow, allowing for arbitrary code execution within the context of the Bochs application.

Reproduction

The vulnerability can be reproduced by using a Python script that generates a payload consisting of 1200 bytes of padding followed by a ROP chain. This crafted payload is then delivered to the Bochs emulator, causing a segmentation fault and demonstrating the buffer overflow. The ROP chain can be designed to execute shell commands by overwriting the instruction pointer with addresses of specific functions in the Bochs process.

Added: Mar 28, 2026, 12:30 PM
Updated: Mar 28, 2026, 12:30 PM

Vulnerability Rating

Custom Algorithm
spread
2.4
impact
7.5
exploitability
4.0
remediation
0.0
relevance
4.8
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.