PostHeaderIcon Attack Secured GD32F303VCT6 Memory: Fault Past the FMC

The GD32F303VCT6 is where the family starts to get serious about pin count: 256 KB of flash in an LQFP100 body, with enough peripherals that the protected code is usually a real product rather than a demo. To attack the secured GD32F303VCT6 memory you target the one moment the chip decides whether to trust you — the FMC security check at boot — rather than the flash it is guarding, and you do it with a fault precise enough to skip that single decision.

The check is a single decision

The Security Protection level is read from the option bytes once, right after reset, and the FMC uses the result to open or close the window between the bus and the flash. Everything downstream — the debug port, the bootloader, the running code — inherits that single decision. So the attack is not against 256 KB of storage but against one comparison that happens in a handful of cycles. Get past it and the whole array is yours; fail and the part behaves exactly as its owner intended, with no partial leak to exploit.

Why fault injection fits this part

A voltage or clock glitch perturbs the core precisely as that comparison executes, so the result is skipped or misread and the window opens. The VCT6 is a good target for this because the larger LQFP100 die gives the boot sequence more room: the decision is not buried in the shortest possible path, and the glitch window is wider and easier to land than on the tiny C8T6. Our clock glitch setup is tuned for exactly this kind of early-boot check, and the 100-pin body is easy to fixture for the duration of the read.

What you can and cannot reach

With the port open the entire 256 KB streams out through SWD. What you cannot do is read it the documented way: the bootloader read-memory command and the normal unlock both respect the level-1 lock and would erase the part if forced. The attack is therefore the only non-destructive route on a level-1 unit, and on a level-2 unit it does not work at all — that case is a physical decapsulation problem instead, reached by a different bench entirely.

Tuning the fault on 100 pins

More pins mean more to fixture and more decoupling on the board, which actually helps: a cleaner power rail makes the glitch repeatable. The capture is verified in blocks so a glitch that closes the port mid-read costs only the last sector, and the read is resumed rather than restarted. The table shows the decision split on this part, which is the same as the smaller members except for the wider window.

SPC level Normal read Fault attack
0 – open yes not needed
1 – read lock no yes
2 – chip lock no no

What we verify before the image leaves

A fault-injected read is only trusted once it is proven whole. The 256 KB is captured twice and the passes are checksummed against each other, and the vector table is confirmed to resolve into runnable code before the part is released. A glitch that closed the window too early would leave a gap that the checksum catches, so the smaller part’s recovery and this one share the same verification discipline, only the window width differs.

The GD32F303 family and why packages differ

The VCT6 is one point on a line that runs from the 48-pin C8T6 up to the 144-pin ZGT6, and the protection logic is identical across all of them — only the pin count, flash size and board decoupling change. That consistency is what lets a single fault-injection method serve the whole family, with the glitch window widening as the package grows. A locked ZGT6 holds sixteen times the flash of the smallest part but answers to the same early-boot check, so the technique scales by patience rather than by reinvention. Knowing where a part sits in the family tells you how long the capture will take and how forgiving the read will be, which is half of planning a recovery before the unit is even on the fixture.

From attacked memory to recovered firmware

Once the window holds, the 256 KB is read, checksummed against the option-byte block, and delivered as a clean binary. If the aim is a running copy, the image is written to a blank part or to another VCT6 with the lock cleared, which is the program duplication step that follows. This is how we attack secured GD32F303VCT6 memory and walk away with the firmware intact.

Comments are closed.