Attack Secured GD32F305VET6 Memory: Fault Past the FMC
The GD32F305VET6 is the 512 KB flash member of the line in the LQFP100 body, and like every protected part in the family its read lock is enforced by the FMC, not by the application. To attack the secured GD32F305VET6 memory you do not break a cipher; you attack the one moment the hardware decides whether to open the flash, and you make that decision fall the wrong way. The method is fault injection, aimed squarely at the memory controller.
The decision worth attacking
After reset the FMC samples the SPC level and gates the AHB window into flash. That gate is re-evaluated on the cycle where the security check runs, and only then. A probe that simply attaches and reads meets a closed window for the entire session; the attack has to land on that single evaluation so the window is open for the few milliseconds the stream needs. Everything in the technique is about hitting that narrow point on the 512 KB array rather than on the code.
Three ways to inject the fault
The fault can be delivered three ways, and the right one depends on the unit. A clock glitch shortens or stretches the clock on the critical cycle; a voltage glitch dips the core supply at the same moment; an electromagnetic pulse couples into the die from a probe held over it. The clock and voltage routes are repeatable and cheap, and are the ones described in our notes on clock glitching and power glitching. The EM route is the fallback when the package or layout makes the other two hard to land on the VET6.
Why LQFP100 gives more room
The larger body helps the attacker as much as the owner. With 100 leads the part is easy to fixture and the power and clock nets are reachable, and the 512 KB array means a longer but still bounded capture once the window holds. The glitch margin — the width of the exploitable window — is wider here than on the smallest parts, which is why the VET6 is a friendlier target than the tight 128 KB RBT6. Margin is the difference between a one-in-ten shot and a repeatable procedure, and a wider margin also lets the rig trade raw precision for repetition, running the same fault many times and keeping only the captures that landed rather than having to nail the timing on the first attempt.
What makes an attack fail
Most failed attempts are timing, not technique: the fault arrives a cycle early or late and the check holds. The rest are parts at level 2, where the SPC is latched and the check no longer runs at all — there is nothing to attack, only a decapsulation to fall back on. Telling the two apart quickly is what keeps an attack from running forever on a part it can never open. On the F305 the USB OTG block shares the same reset and clock domain as the FMC, so a fault aimed at the memory controller has to be scoped to that domain and not spill into the USB state machine, which is a second reason the VET6 benefits from the room its larger package gives the rig. The smaller RCT6 flash read uses the same opening and the same discipline on a shorter array.
Verifying the window held
A successful attack is only proven by the data. The 512 KB is read in blocks and each block is checksummed against a second pass; a window that closed mid-read shows up as a mismatch on exactly the blocks captured during the closure, and those are re-read. Only a clean, complete image is accepted, because a silently truncated capture is worse than no capture. The binary decode that follows assumes the image it receives is whole.
| Fault type | How it lands | When it is used |
|---|---|---|
| Clock glitch | stretches the critical cycle | default, repeatable |
| Voltage glitch | dips core supply | when clock is hard to reach |
| EM pulse | couples into the die | package blocks the others |
How the memory is returned
The result of the attack is the full 512 KB array, read while the window was open, delivered as a binary with the option bytes. The part leaves the bench electrically as it arrived; only its contents have moved. Where the goal is a copy rather than an analysis, the same image feeds the program duplication of the 1 MB VGT6, which is the same attack scaled to a larger array.