Research Article
Framework for State-Aware Virtual Hardware Fuzzing
Algorithm 1
Fuzzing algorithm based on state-based fuzzing strategy.
1: ; | 2: ; | 3: ; | 4: while do | 5: ; | 6: feedback = FuzzOne(tnow); | 7: ifAffectKeyStruct(feedback) then | 8: ResetHardware(); | 9: ifNotDuplicated(Shigh,tnow) then | 10: AddTo(Shigh,tnow); | 11: end if | 12: end if | 13: end while | 14: whileTruedo | 15: mod ; | 16: fordo | 17: RollBack(Qnow); | 18: for to do | 19: tnow = TestcaseMutate(Shigh,Snormal); | 20: feedback = FuzzOne(tnow); | 21: ifAffectKeyStruct(feedback) then | 22: ifNotDuplicated(Shigh,tnow) then | 23: AddTo(Shigh,tnow); | 24: end if | 25: end if | 26: ifDetectNewBranch(tnow) then | 27: AddTo(Snormal); | 28: end if | 29: ifCauseCrash(feedback) then | 30: LogCrash(Qnow,tnow); | 31: end if | 32: end for | 33: end for | 34: end while |
|