The embodiment of the invention discloses a taint
analysis method and device,
electronic equipment, a storage medium and a program product, static instruction analysis and dynamic tracking are carried out on a code instruction through a
machine code analysis result of the code instruction and an instruction context
information object respectively, the limitation of single static instruction analysis in
processing taint analysis is overcome, and the taint analysis efficiency is improved. A register set, a
memory address set and the like polluted by the target
stain are recorded through the
stain tracking state object, the stains in the register and the memory are tracked at the same time, the main mode of
stain propagation is covered, and according to the preset analysis termination condition, the target stain can be accurately tracked. The code instructions of the target code
instruction sequence are reversely traversed from the code instruction where the target stain is located, stain analysis is carried out on the code instructions of the target code
instruction sequence to update the stain tracking state object, a stain analysis result is finally obtained, the
data dependency relationship in a register and a memory is efficiently and accurately tracked, and the data tracking efficiency is improved. Therefore, effective
backtracking of the stain source is realized.