
Discovering a Hardware Bug in a Shipping RISC-V Processor

Reference: Wren6991/Hazard3 #56 | Hardware: Raspberry Pi Pico 2 (RP2350) and upstream Hazard3
As part of our ongoing AI research at ChipAgents, we identified a previously undisclosed hardware defect in Hazard3, the open source RISC-V processor integrated into the Raspberry Pi RP2350 microcontroller.
Under specific execution conditions, the processor produces incorrect results for integer division and remainder instructions, without raising an exception.
We validated the defect across multiple Hazard3 revisions, reproduced it on physical Raspberry Pi Pico 2 (RP2350) hardware and filed Hazard3 #56.
The bug
Division takes several clock cycles. When an interrupt arrives mid-division, Hazard3 immediately cancels the divider (resetting it and marking it done) to prepare for the interrupt handler. However, if switching to the handler is briefly delayed (for example, while waiting on memory) and the interrupt signal drops before the switch happens, the processor skips the interrupt and continues running. Because it never restarts the canceled calculation, the instruction finishes with that reset state: division returns the first number (e.g., 100 ÷ 7 returns 100), and remainder returns 0, with no warning to software.
The impact
Because the wrong value looks completely normal to software, this bug causes silent data corruption on shipping RP2350 chips and upstream Hazard3.
To show how a low-level hardware flaw becomes a real product failure, we built a working RP2350 heart-rate monitor with an optical pulse sensor, touchscreen, and alarm. Calculating beats per minute (60,000 ÷ beat_interval) should read a healthy ~73 BPM; but when the bug hits (triggered on demand by touching the screen), the divider silently outputs 60,000 BPM, spiking the display and sounding the high-heart-rate siren on a normal pulse.
Standard peripherals that keep interrupts active until software clears them are unaffected. Triggering the bug requires a brief, disappearing interrupt during a delayed division (such as cross-core clears or short external pulses), so how often everyday firmware hits it is unknown, and no security bypass was observed.
Beyond this discovery
Our broader research explores the capability of AI to establish hardware correctness, identify latent defects, and reason about complex processor behavior. For researchers and engineers interested in our methodology, experimental findings, or potential research collaborations, please reach out to the ChipAgents research team at research@alphadesign.ai.

