IP Library Granted Patent US 8,037,529
Granted Patent B1
US 8,037,529 · App. 12/051,441 · Granted Oct 11, 2011

Buffer overflow vulnerability detection and patch generation system and method

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 8,037,529
App. No.
12/051,441
Granted
Oct 11, 2011
Kind
B1
Abstract

A computer-implemented method includes identifying a buffer overflow vulnerability in a vulnerable program including identifying a victim buffer creation site that created a victim buffer and identifying a vulnerability site that overflowed the victim buffer. A patch is created for the vulnerable program to prevent the vulnerability site from overflowing a potential victim buffer created by the victim buffer creation site. In this manner, the information obtained in identifying the buffer overflow vulnerability is used to automatically derive a patch that accurately seals the vulnerability, greatly reduces the false positive and negative rate, while at the same time shortens the response time to new threats.

Claims (54)

1. A computer-implemented method comprising:

identifying a buffer overflow vulnerability in a vulnerable program comprising:

identifying a victim buffer creation site that created a victim buffer; and

identifying a vulnerability site that overflowed said victim buffer; and

creating a patch for said vulnerable program to prevent said vulnerability site from overflowing a potential victim buffer created by said victim buffer creation site comprising:

maintaining a potential victim buffer address map comprising said potential victim buffer;

using said potential victim buffer address map to determine whether a buffer being written to by a write instruction is said potential victim buffer;

creating a progress map entry in a progress map upon a determination that said buffer being written to by said write instruction is said potential victim buffer;

saving an address range of said potential victim buffer in said progress map entry;

saving a target memory address of said write instruction in said progress map entry;

saving a current access stride in said progress map entry;

determining that said target memory address is outside of said address range of said potential victim buffer; and

determining whether said current access stride is equal to a last access stride.

2. The computer-implemented method of claim 1 wherein said identifying a buffer overflow vulnerability in a vulnerable program further comprises emulating an instruction of said vulnerable program.

3. The computer-implemented method of claim 2 wherein said identifying a buffer overflow vulnerability in a vulnerable program further comprises determining whether a buffer is allocated during said emulating an instruction.

4. The computer-implemented method of claim 2 wherein, upon a determination that a buffer is allocated during said emulating an instruction, said identifying a buffer overflow vulnerability in a vulnerable program further comprising updating an allocated buffer versus instruction map with said buffer and said instruction that allocated said buffer.

5. The computer-implemented method of claim 4 wherein said identifying a victim buffer creation site that created a victim buffer is performed using said allocated buffer versus instruction map.

6. The computer-implemented method of claim 2 wherein said identifying a buffer overflow vulnerability in a vulnerable program further comprises determining whether a memory location is modified during said emulating an instruction.

7. The computer-implemented method of claim 6 wherein, upon a determination that a memory location is modified during said emulating an instruction, said identifying a buffer overflow vulnerability in a vulnerable program further comprises updating a modified memory locations versus modifying instructions map with said modified memory location and said instruction that modified said memory location.

8. The computer-implemented method of claim 7 wherein said identifying a vulnerability site that overflowed said victim buffer is performed using said modified memory locations versus modifying instructions map.

9. The computer-implemented method of claim 2 wherein said identifying a buffer overflow vulnerability in a vulnerable program further comprises determining whether said instruction is a return.

10. The computer-implemented method of claim 9 wherein, upon a determination that said instruction is a return, said identifying a buffer overflow vulnerability in a vulnerable program further comprising determining whether a control sensitive data structure (CSDS) is corrupted.

11. The computer-implemented method of claim 10 , wherein upon a determination that said CSDS is corrupted, said identifying a buffer overflow vulnerability in a vulnerable program comprising said identifying a victim buffer creation site that created a victim buffer and said identifying a vulnerability site that overflow said victim buffer.

12. The computer-implemented method of claim 11 wherein said identifying a buffer overflow vulnerability in a vulnerable program further comprises identifying said victim buffer.

13. The computer-implemented method of claim 1 wherein said identifying a buffer overflow vulnerability in a vulnerable program comprises running an exploit against said vulnerable program in an emulated environment.

14. The computer-implemented method of claim 1 wherein upon a determination that said current access stride is equal to said last access stride, said creating a patch for said vulnerable program further comprises taking protective action.

15. A computer system comprising:

a memory having stored therein a buffer overflow vulnerability detection and patch generation application; and

a processor coupled to said memory, wherein execution of said buffer overflow vulnerability detection and patch generation application generates a method comprising:

identifying a buffer overflow vulnerability in a vulnerable program comprising:

identifying a victim buffer creation site that created a victim buffer; and

identifying a vulnerability site that overflowed said victim buffer; and

creating a patch for said vulnerable program to prevent said vulnerability site from overflowing a potential victim buffer created by said victim buffer creation site comprising:

maintaining a potential victim buffer address map comprising said potential victim buffer;

using said potential victim buffer address map to determine whether a buffer being written to by a write instruction is said potential victim buffer;

creating a progress map entry in a progress map upon a determination that said buffer being written to by said write instruction is said potential victim buffer;

saving an address range of said potential victim buffer in said progress map entry;

saving a target memory address of said write instruction in said progress map entry;

saving a current access stride in said progress map entry;

determining that said target memory address is outside of said address range of said potential victim buffer; and

determining whether said current access stride is equal to a last access stride.

16. A computer-program product comprising a tangible computer readable non-transitory storage medium containing computer program code comprising:

a buffer overflow vulnerability detection and patch generation application for identifying a buffer overflow vulnerability in a vulnerable program comprising:

identifying a victim buffer creation site that created a victim buffer; and

identifying a vulnerability site that overflowed said victim buffer; and

said buffer overflow vulnerability detection and patch generation application further for creating a patch for said vulnerable program to prevent said vulnerability site from overflowing a potential victim buffer created by said victim buffer creation site comprising:

maintaining a potential victim buffer address map comprising said potential victim buffer;

using said potential victim buffer address map to determine whether a buffer being written to by a write instruction is said potential victim buffer;

creating a progress map entry in a progress map upon a determination that said buffer being written to by said write instruction is said potential victim buffer;

saving an address range of said potential victim buffer in said progress map entry;

saving a target memory address of said write instruction in said progress map entry;

saving a current access stride in said progress map entry;

determining that said target memory address is outside of said address range of said potential victim buffer; and

determining whether said current access stride is equal to a last access stride.

Assignments (4)
NOTICE OF SUCCESSION OF AGENCY (REEL 050926 / FRAME 0560) Recorded Sep 13, 2022
From: JPMORGAN CHASE BANK, N.A.
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 061422/0371 →
SECURITY AGREEMENT Recorded Sep 13, 2022
From: NORTONLIFELOCK INC.
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 062220/0001 →
SECURITY AGREEMENT Recorded Nov 4, 2019
From: SYMANTEC CORPORATION; BLUE COAT LLC; LIFELOCK, INC,; SYMANTEC OPERATING CORPORATION
To: JPMORGAN, N.A.
Reel/Frame 050926/0560 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 19, 2008
From: CHIUEH, TZI-CKER; GRIFFIN, KENT "E"
To: SYMANTEC CORPORATION
Reel/Frame 020674/0537 →