Software vulnerabilities are a critical issue in modern development. Directed Greybox Fuzzing (DGF) is a powerful testing technique to find these flaws, but it faces a major bottleneck. It requires precise targets to work effectively. Currently, identifying these targets relies on manual analysis by security experts, which is slow and difficult to scale. While Large Language Models (LLMs) are used for code analysis, existing methods often look at functions in isolation and fail to detect complex bugs that span multiple functions (inter-procedural vulnerabilities). We propose a method for identifying critical locations in source code where unsafe interactions could occur using LLMs. The goal is to improve the efficiency of selecting analysis targets without requiring the entire codebase as input. Our approach introduces a representation we call Capability Information, which explains functional characteristics of each function. This information focuses on the transformation of input data into output. This enables the detection of unsafe interactions, where a parent function misuses a child function. To measure how well our framework identifies critical locations in C source code, we conducted experiments on two datasets. The first dataset is the FormAI dataset. This dataset includes AI-generated code with mainly intra-procedural vulnerabilities. The second dataset is the InterPVD dataset, which contains real-world inter-procedural vulnerabilities. The results indicate that, for code which includes simple intra-procedural vulnerabilities, our method achieves performance comparable to the baseline. In complex cases within InterPVD (CVE-2014-9728 and CVE-2013-0862), we demonstrate that our method can identify inter-procedural vulnerabilities that the baseline failed to detect. This study demonstrates that, by leveraging LLMs not merely as classifiers but as reasoning agents that understand and propagate semantic information across functions, it is possible to generate target information to aid experts.

Le vulnerabilità software rappresentano un problema critico nello sviluppo moderno. Il Directed Greybox Fuzzing (DGF) è una potente tecnica di testing per individuare tali difetti, ma presenta un importante collo di bottiglia: per funzionare in modo efficace richiede target precisi. Attualmente, l’identificazione di questi target si basa su un’analisi manuale condotta da esperti di sicurezza, un processo lento e difficile da scalare. Sebbene i Large Language Models (LLM) vengano utilizzati per l’analisi del codice, i metodi esistenti esaminano spesso le funzioni in modo isolato e non riescono a rilevare bug complessi che si estendono su più funzioni (vulnerabilità inter-procedurali). In questo articolo proponiamo un metodo per identificare le posizioni critiche nel codice sorgente in cui potrebbero verificarsi interazioni non sicure, utilizzando gli LLM con l’obiettivo di migliorare l’efficienza della selezione dei target per il DGF. Il nostro approccio consente all’LLM di comprendere le relazioni tra le funzioni. Il concetto chiave è la Capability Information. Essa permette di rilevare interazioni non sicure, in cui una funzione padre utilizza in modo improprio una funzione figlia, senza richiedere l’intero codebase come input. Per valutare l’efficacia del metodo proposto, abbiamo condotto esperimenti utilizzando il dataset FormAI, che include codice sintetico, e il dataset InterPVD, che contiene vulnerabilità inter-procedurali reali. I risultati sperimentali mostrano che, per vulnerabilità intra-procedurali semplici, il nostro metodo mantiene prestazioni comparabili alla baseline. Inoltre, nei casi complessi presenti in InterPVD (ad esempio, CVE-2014-9728 e CVE-2013-0862), il nostro metodo è in grado di identificare correttamente vulnerabilità inter-procedurali che la baseline non è riuscita a rilevare. Questo studio dimostra che, sfruttando gli LLM non solo come classificatori ma come agenti capaci di comprendere e propagare informazioni semantiche tra funzioni, è possibile generare informazioni sui target per aiutare l'identificazione successiva da parte di un esperto.

White-box identification of unsafe inter-procedural interactions using Large Language Models

FUJIMOTO, SHODAI
2024/2025

Abstract

Software vulnerabilities are a critical issue in modern development. Directed Greybox Fuzzing (DGF) is a powerful testing technique to find these flaws, but it faces a major bottleneck. It requires precise targets to work effectively. Currently, identifying these targets relies on manual analysis by security experts, which is slow and difficult to scale. While Large Language Models (LLMs) are used for code analysis, existing methods often look at functions in isolation and fail to detect complex bugs that span multiple functions (inter-procedural vulnerabilities). We propose a method for identifying critical locations in source code where unsafe interactions could occur using LLMs. The goal is to improve the efficiency of selecting analysis targets without requiring the entire codebase as input. Our approach introduces a representation we call Capability Information, which explains functional characteristics of each function. This information focuses on the transformation of input data into output. This enables the detection of unsafe interactions, where a parent function misuses a child function. To measure how well our framework identifies critical locations in C source code, we conducted experiments on two datasets. The first dataset is the FormAI dataset. This dataset includes AI-generated code with mainly intra-procedural vulnerabilities. The second dataset is the InterPVD dataset, which contains real-world inter-procedural vulnerabilities. The results indicate that, for code which includes simple intra-procedural vulnerabilities, our method achieves performance comparable to the baseline. In complex cases within InterPVD (CVE-2014-9728 and CVE-2013-0862), we demonstrate that our method can identify inter-procedural vulnerabilities that the baseline failed to detect. This study demonstrates that, by leveraging LLMs not merely as classifiers but as reasoning agents that understand and propagate semantic information across functions, it is possible to generate target information to aid experts.
ING - Scuola di Ingegneria Industriale e dell'Informazione
26-mar-2026
2024/2025
Le vulnerabilità software rappresentano un problema critico nello sviluppo moderno. Il Directed Greybox Fuzzing (DGF) è una potente tecnica di testing per individuare tali difetti, ma presenta un importante collo di bottiglia: per funzionare in modo efficace richiede target precisi. Attualmente, l’identificazione di questi target si basa su un’analisi manuale condotta da esperti di sicurezza, un processo lento e difficile da scalare. Sebbene i Large Language Models (LLM) vengano utilizzati per l’analisi del codice, i metodi esistenti esaminano spesso le funzioni in modo isolato e non riescono a rilevare bug complessi che si estendono su più funzioni (vulnerabilità inter-procedurali). In questo articolo proponiamo un metodo per identificare le posizioni critiche nel codice sorgente in cui potrebbero verificarsi interazioni non sicure, utilizzando gli LLM con l’obiettivo di migliorare l’efficienza della selezione dei target per il DGF. Il nostro approccio consente all’LLM di comprendere le relazioni tra le funzioni. Il concetto chiave è la Capability Information. Essa permette di rilevare interazioni non sicure, in cui una funzione padre utilizza in modo improprio una funzione figlia, senza richiedere l’intero codebase come input. Per valutare l’efficacia del metodo proposto, abbiamo condotto esperimenti utilizzando il dataset FormAI, che include codice sintetico, e il dataset InterPVD, che contiene vulnerabilità inter-procedurali reali. I risultati sperimentali mostrano che, per vulnerabilità intra-procedurali semplici, il nostro metodo mantiene prestazioni comparabili alla baseline. Inoltre, nei casi complessi presenti in InterPVD (ad esempio, CVE-2014-9728 e CVE-2013-0862), il nostro metodo è in grado di identificare correttamente vulnerabilità inter-procedurali che la baseline non è riuscita a rilevare. Questo studio dimostra che, sfruttando gli LLM non solo come classificatori ma come agenti capaci di comprendere e propagare informazioni semantiche tra funzioni, è possibile generare informazioni sui target per aiutare l'identificazione successiva da parte di un esperto.
File allegati
File Dimensione Formato  
Polimi_thesis_executive_summary_shodai_fujimoto_10985429.pdf

accessibile in internet per tutti

Dimensione 938.85 kB
Formato Adobe PDF
938.85 kB Adobe PDF Visualizza/Apri
Polimi_thesis_shodai_fujimoto_10985429.pdf

accessibile in internet per tutti

Dimensione 2.27 MB
Formato Adobe PDF
2.27 MB Adobe PDF Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/252031