The invention discloses a binary program bug detection method based on function difference. The method comprises the following steps of: extracting patch features for a known bug function, performingfeature matching in a suspected target function, identifying whether a corresponding patch is made in the suspected target function or not, and judging whether a known bug is contained or not. The method comprises the following steps: firstly, determining a bug related function, collecting a binary code containing the bug function and a repaired function, and disassembling the binary code; secondly, determining the change between two versions of the same function by using a differential analysis technology, and generating patch features; and finally, screening out a suspected target function from a target program, positioning and representing a local key area in the suspected target function, performing feature matching through similarity calculation to detect whether the target function contains vulnerabilities, and completing vulnerability detection of the target program accordingly. The method aims at quickly and accurately detecting whether a target program contains a bug or not after a to-be-searched known bug is given, and the problem that an existing bug detection method based on function matching is high in false alarm rate is solved.