Embodiments of the present invention relate to systems and methods for
detecting software buffer security vulnerabilities. According to an
embodiment, a computer-readable medium stores a plurality of instructions
to be executed by a processor for detecting software buffer security
vulnerabilities. The plurality of instructions comprise instructions to
receive software code associated with a potential buffer vulnerability,
generate constraints related to the software code associated with the
potential buffer vulnerability, partition the software code into one or
more procedures, and generate for each procedure a set of constraints
that summarizes the impact of a procedure on buffer variables. The
computer-readable medium also stores instructions to receive a system
dependence graph corresponding to the software code, traverse back along
the system dependence graph to collect constraints related to the
potential buffer vulnerability, and reduce the collected constraints to
determine a maximum value length that has been assigned to a buffer
corresponding to a potential buffer vulnerability. The plurality of
instructions also include to compare the maximum value length that has
been assigned to a buffer to an amount of memory that has been allocated
to the buffer to determine whether there is a buffer vulnerability.