IP Library Granted Patent US 12,393,698
Granted Patent B2
US 12,393,698 · App. 18/452,285 · Granted Aug 19, 2025

Code vulnerability detection and validation

Inventors: Alexander Jordan (Vienna, AT); Mahinthan Chandramohan (Brisbane, AU)
Assignee: Oracle International Corporation
G06F21/577G06F8/71
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 12,393,698
App. No.
18/452,285
Granted
Aug 19, 2025
Kind
B2
Abstract

A method of code vulnerability detection includes obtaining a set of patches from at least one code repository for a vulnerability record of a vulnerability of a software component, applying the set of patches to obtain a modified set of code files modified by the set of patches, and inferring a vulnerable code section set according to the modified set of code files. The vulnerable code section set is a subset of the modified set of code files. The method further includes obtaining a vulnerable version list of a plurality of versions of the software component comprising the vulnerability, validating a version in the vulnerable version list as having the vulnerable code section set, and processing a target software comprising the version using the vulnerable code section set.

Claims (59)

1. A method comprising:

obtaining a set of patches from at least one code repository for a vulnerability record of a vulnerability of a software component;

applying the set of patches to obtain a modified set of code files modified by the set of patches;

inferring a vulnerable code section set according to the modified set of code files, wherein the vulnerable code section set is a subset of the modified set of code files;

obtaining a vulnerable version list of a plurality of versions of the software component comprising the vulnerability;

validating a version in the vulnerable version list as having the vulnerable code section set; and

processing a target software comprising the version using the vulnerable code section set.

2. The method of claim 1 , further comprising:

calculating, for a modified code file, at least one difference between code sections in corresponding original set of code files and code sections in the modified set of code files; and

inferring at least one modified code section based on a comparison of the at least one difference with a plurality of vulnerability rules.

3. The method of claim 2 , wherein the plurality of vulnerability rules specify that a programming language structure is a vulnerable code section when the at least one difference comprises the programming language structure being at least one selected from a group consisting of the programming language structure being removed and the programming language structure being added, wherein the programming language structure encapsulates code.

4. The method of claim 2 , wherein the plurality of vulnerability rules specify that the programming language structure is a vulnerable code section when the at least one difference comprises code encapsulated in the programming language structure is being added.

5. The method of claim 2 , wherein the plurality of vulnerability rules specifies that a programming language structure being added to the software component according to at least one difference fails to trigger adding the programming language structure to the vulnerable code section set, wherein the programming language structure encapsulates code.

6. The method of claim 1 , wherein the vulnerable code section set comprises an identifier of a code section that is at least one of an individual class and an individual method in the software component.

7. The method of claim 1 , wherein processing the target software comprises:

scanning the target software to determine an included set of vulnerable software components that are comprised in the target software;

scanning, for at least one vulnerable software component in the included set of vulnerable software components, the target software for vulnerable code sections in the vulnerable code section set to obtain an included set of vulnerable code sections; and

revising the target software according to the included set of vulnerable code sections to generate revised target software.

8. The method of claim 7 , further comprising:

executing the revised target software.

9. The method of claim 1 , further comprising:

grouping a plurality of vulnerability records into a vulnerability group based on a commonality of a type of vulnerability.

10. The method of claim 1 , further comprising:

lifting the version of the software component to obtain code sections in a lifted version,

wherein the validating is performed using the lifted version.

11. The method of claim 1 , further comprising:

calculating at least one difference between code sections in compiled code before and after applying the set of patches,

wherein inferring the vulnerable code section set is performed using the at least one difference.

12. A system comprising:

a data repository storing a vulnerable code section record; and

at least one processor for executing instructions for performing operations comprising:

obtaining a set of patches from at least one code repository for a vulnerability record of a vulnerability of a software component,

applying the set of patches to obtain a modified set of code files modified by the set of patches,

inferring a vulnerable code section set according to the modified set of code files, wherein the vulnerable code section set is a subset of the modified set of code files,

obtaining a vulnerable version list of a plurality of versions of the software component comprising the vulnerability,

validating a version in the vulnerable version list as having the vulnerable code section set,

storing the vulnerable code section set in the vulnerable code section record, and

processing a target software comprising the version using the vulnerable code section record.

13. The system of claim 12 , wherein the operations further comprise:

calculating, for a modified code file, at least one difference between code sections in corresponding original set of code files and code sections in the modified set of code files; and

inferring at least one modified code section based on a comparison of the at least one difference with a plurality of vulnerability rules.

14. The system of claim 13 , wherein the plurality of vulnerability rules specify that a programming language structure is a vulnerable code section when the at least one difference comprises the programming language structure being at least one selected from a group consisting of the programming language structure being removed and the programming language structure being added, wherein the programming language structure encapsulates code.

15. The system of claim 13 , wherein the plurality of vulnerability rules specify that the programming language structure is a vulnerable code section when the at least one difference comprises code encapsulated in the programming language structure is being added.

16. The system of claim 13 , wherein the plurality of vulnerability rules specifies that a programming language structure being added to the software component according to at least one difference fails to trigger adding the programming language structure to the vulnerable code section set, wherein the programming language structure encapsulates code.

17. The system of claim 12 , wherein the vulnerable code section set comprises an identifier of a code section that is at least one of an individual class and an individual method in the software component.

18. The system of claim 12 , wherein processing the target software comprises:

scanning the target software to determine an included set of vulnerable software components that are comprised in the target software;

scanning, for at least one vulnerable software component in the included set of vulnerable software components, the target software for vulnerable code sections in the vulnerable code section set to obtain an included set of vulnerable code sections; and

revising the target software according to the included set of vulnerable code sections to generate revised target software.

19. A non-transitory computer readable medium comprising computer readable program code for performing operations comprising:

obtaining a set of patches from at least one code repository for a vulnerability record of a vulnerability of a software component;

applying the set of patches to obtain a modified set of code files modified by the set of patches;

inferring a vulnerable code section set according to the modified set of code files, wherein the vulnerable code section set is a subset of the modified set of code files;

obtaining a vulnerable version list of a plurality of versions of the software component comprising the vulnerability;

validating a version in the vulnerable version list as having the vulnerable code section set; and

processing a target software comprising the version using the vulnerable code section set.

20. The non-transitory computer readable medium of claim 19 , wherein the operations further comprise:

calculating, for a modified code file, at least one difference between code sections in corresponding original set of code files and code sections in the modified set of code files; and

inferring at least one modified code section based on a comparison of the at least one difference with a plurality of vulnerability rules.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 21, 2023
From: JORDAN, ALEXANDER; CHANDRAMOHAN, MAHINTHAN
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 064650/0082 →
Continuity (1)
Related Publication 20250061207A1 · Feb 20, 2025
References Cited (11)
US 20050223268A1 · Tchen · 2005 [cited by examiner]
US 20130024854A1 · Kumagai · 2013 [cited by examiner]
US 20210019418A1 · Peeters · 2021 [cited by examiner]
US 20230236827A1 · Nemirovsky · 2023 [cited by examiner]
US 20230273783A1 · Molander · 2023 [cited by examiner]
US 20240045669A1 · D'Souza · 2024 [cited by examiner]
Guru Bhandari, Amara Naseer, and Leon Moonen. “CVE_xes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Software”. In: Proceedings of the 17th International Conference on Predictive Models and D… [cited by applicant]
Quang-Cuong Bui, Riccardo Scandariato, and Nicol_as E D__az Ferreyra. “Vul4J: a dataset of reproducible Java vulnerabilities geared towards the study of program repair techniques”. In: Proceedings of the 19th Internatio… [cited by applicant]
Dhavleesh Rattan, Rajesh Bhatia, and Maninder Singh. “Software clone detection: A systematic review”. In: Information and Software Technology 55.7 (2013), pp. 1165-1199, 35 pages. [cited by applicant]
Serena Elisa Ponta, Henrik Plate, and Antonino Sabetta. “Detection, assessment and mitigation of vulnerabilities in open source dependencies”. In: Empirical Software Engineering 25.5 (2020), pp. 3175-3215, 41 pages. [cited by applicant]
Guanjun Lin et al. “Software Vulnerability Detection Using Deep Neural Networks: A Survey”. In: Proceedings of the IEEE 108.10 (2020), pp. 1825-1848. 24 pages. [cited by applicant]
Cited By (1)
US 12,682,078