Research Article

Characterization of Program Behavior under Faulty Instruction Encoding

Table 2

Examples of realigned, preserved, and invalid categories.

CategoryBefore fault injectionAfter fault injectionDescription
EncodingAssemblyEncodingAssembly

Realigned85 C0TEST EAX, EAX05 C0 74 12 B8ADD EAX, 0xB81274C0The most significant bit of the first instruction is changed to 0. The fault changes the length (2 bytes) of first instruction into 5 bytes. The subsequent instructions are also affected. The immediate of MOV EAX, 0x0 is interpreted as two ADD instructions.
74 12JZ00 00ADD [EAX], AL
B8 00 00 00 00MOV EAX, 0x000 00ADD [EAX], AL

Preserved85 C0TEST EAX, EAX84 C0TEST AL,ALThe fault changes the operand EAX in the original instruction into AL. The length of the first instruction remains 2 bytes, and thus, the consequent JZ instruction is unaffected.
74 12JZ74 12JZ

Invalid85 C0TEST EAX, EAX8D C0(cannot be decoded)The encoding 8D C0 cannot be decoded. The fault incurs an illegal instruction exception.