IP Library Granted Patent US 7,617,489
Granted Patent B2
US 7,617,489 · App. 11/522,039 · Granted Nov 10, 2009

Method and system for detecting interprocedural vulnerability by analysis of source code

Assignee: Ounce Labs, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,617,489
App. No.
11/522,039
Granted
Nov 10, 2009
Kind
B2
Abstract

Methods and systems of detecting vulnerabilities in source code using inter-procedural analysis of source code. Vulnerabilities in a pre-existing source code listing are detected. The variables in the source code listing are modeled in the context of at least one of the inherent control flow and inherent data flow. The variable models are used to create models of arguments to routine calls in the source code listing. The source code listing is modeled with a call graph to represent routine call interactions expressed in the source code listing. The arguments to routine calls are modeled to account for inter-procedural effects and dependencies on the arguments as expressed in the source code listing.

Claims (22)

1. A computer implemented method of detecting vulnerabilities in a pre-existing source code listing, stored in computer readable medium having computer executable instructions, said source code listing having a plurality of routines and a plurality of calls to routines, said source code listing further having an inherent control flow and an inherent data flow during the computer execution thereof, said computer implemented method comprising the acts of:

analyzing the control flow and data flow of the source code listing and modeling the variables in the source code listing in the context of at least one of the inherent control flow and inherent data flow, in which each model specifies pre-determined characteristics about each variable;

using the variable models to create models of arguments to routine calls in the source code listing;

modeling the source code listing with a call graph to represent routine call interactions expressed in the source code listing;

traversing the call graph in modeling the arguments to routine calls to account for inter-procedural effects and dependencies on changes in ranges of possible values of the arguments as expressed in the source code listing, wherein said traversing is controlled by rules to limit computational costs of the modeling;

using the argument models in conjunction with pre-specified criteria for the corresponding routine calls to determine whether the routine calls possess vulnerabilities as a consequence of the ranges of possible values of the arguments and known routine behavior; and

generating a report, usable by a user, that identifies the vulnerabilities.

2. The method of claim 1 wherein the modeling of the routine arguments is context sensitive.

3. The method of claim 1 wherein the call graph model includes paths and wherein a path may be traversed a plurality of times depending on the expression of the source code listing.

4. The method of claim 3 wherein a path is not re-traversed if it has been previously traversed with the same models and with the same values for said models.

5. The method of claim 1 , wherein the rules reduce computational time for said traversing and said modeling of the arguments.

6. The method of claim 1 , wherein the rules reduce memory usage for said traversing and said modeling of the arguments.

7. The method of claim 1 , wherein the rules specify conditions under which a path in the call graph will be avoided.

8. The method of claim 1 , wherein said traversing of the call graph comprises propagating, at each call cite, accumulated knowledge about arguments at the call cite to the formal parameters of the called routine.

9. The method of claim 8 , wherein the accumulated knowledge about each argument is represented as a vulnerability lattice.

10. The method of claim 9 , wherein the propagating comprises linking vulnerability lattices of the formal parameters to the vulnerability lattices of the corresponding arguments.

11. The method of claim 8 , wherein said traversing of the call graph further comprises:

determining, at a routine call, that new information is derived about formal parameters or return values of that routine; and

marking an operation in the caller of the routine call for revisiting if the operation is affected by the new information.

12. The method of claim 8 , wherein said traversing of the call graph further comprises:

recording, for each routine call, information regarding whether the routine call has been previously traversed, and if so, information relating to values of arguments for the routine call during the previous traversal; and

avoiding re-traversing a call cite in the call graph and the sub call graph below that call cite if the associated routine call has been previously traversed with arguments having the same ranges of values as a current traversal.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 18, 2010
From: OUNCE LABS, INC.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 023950/0593 →
SECURITY INTEREST Recorded Dec 31, 2008
From: OUNCE LABS, INC.
To: SQUARE 1 BANK
Reel/Frame 022043/0977 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 15, 2007
From: PEYTON, JOHN; GOTTLIEB, ROBERT
To: OUNCE LABS, INC.
Reel/Frame 019962/0770 →
Continuity (1)
Related Publication 20080072214A1 · Mar 20, 2008