Next Article in Journal
Numerical Scheme for Modified Anomalous Time-Fractional Sub-Diffusion Equations Using the Shifted Dickson Polynomials of the Second Kind
Previous Article in Journal
A Linear Fully Discrete Spectral Scheme for the Time Fractional Allen–Cahn Equation
Previous Article in Special Issue
Kyber AHE: An Easy-to-Implement Additive Homomorphic Encryption Scheme Based on Kyber and Its Application in Biometric Template Protection
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

ParaTaintGX: Detecting Memory Corruption Vulnerabilities in SGX Applications via Parameter-Taint Model

1
Cyberspace Institute of Advanced Technology, Guangzhou University, Guangzhou 510006, China
2
Guangzhou Imformation Technology Security Evaluation Center, Guangzhou 510635, China
3
School of Computer Science and Technology, Harbin Institute of Technology (Shenzhen), Shenzhen 518071, China
*
Author to whom correspondence should be addressed.
Mathematics 2026, 14(6), 1007; https://doi.org/10.3390/math14061007
Submission received: 13 February 2026 / Revised: 10 March 2026 / Accepted: 11 March 2026 / Published: 16 March 2026

Abstract

Intel Software Guard Extensions (SGX) have been widely studied and adopted in privacy-preserving information systems to enhance the security and privacy guarantees of sensitive data computation. By constructing a protected enclave within the processor, SGX provides hardware-enforced confidentiality and integrity for sensitive data and critical code. Nevertheless, due to inevitable interactions between trusted enclaves and untrusted host environments, SGX applications remain vulnerable to memory corruption attacks. Existing detection techniques exhibit fundamental limitations, including the lack of systematic induction of SGX-specific memory corruption behaviors, the absence of fine-grained parameter-level taint modeling during call-chain construction, and relatively inefficient call-chain exploration strategies over large search spaces. To address these issues, we propose ParaTaintGX, an analysis framework that integrates parameter-level taint states into vulnerability detection. ParaTaintGX constructs fine-grained call-chain nodes that capture both functions and the taint states of their parameters. It further introduces a Multi-node Heuristic Priority Search Algorithm to guide call-chain exploration. In addition, a backtracking-based pruning strategy is applied during path analysis to efficiently identify memory corruption vulnerabilities. Our evaluation demonstrates that ParaTaintGX discovers 12 vulnerabilities across 10 open-source SGX projects, outperforming the best baseline tool by two vulnerabilities. It achieves 19.35% precision, surpassing the most precise existing tool by 8.37 percentage points. These results highlight its superior detection capability and precision.

1. Introduction

In modern computing environments where cloud platforms, distributed systems, and blockchain-based applications are increasingly deployed [1,2,3,4,5,6,7,8,9], large volumes of privacy-sensitive data are centrally collected and processed on untrusted computing platforms, making data security and privacy protection during computation a critical concern. To prevent sensitive information from being exposed throughout the computation lifecycle, researchers have proposed a wide range of privacy-preserving and security-enhancing mechanisms [10,11,12,13,14]. However, most existing security and privacy protection mechanisms are built upon the assumption of a trusted privileged software stack, including the operating system and the virtual machine monitor. Once these high-privilege components are compromised, adversaries can gain unrestricted access to application memory and arbitrarily manipulate sensitive data and code, thereby fundamentally undermining the effectiveness of runtime protection [15,16,17,18].
Trusted Execution Environment (TEE), such as Intel SGX, address this limitation by shifting the root of trust from the vulnerable software stack into the processor via hardware mechanisms. This provides a strongly isolated execution environment for designated code and data, ensuring that critical computations retain verifiable security guarantees even when the host platform is untrusted or fully compromised.
In this context, Intel SGX provides a hardware-based trusted execution environment that establishes a protected enclave within the processor to ensure the confidentiality and integrity of critical code and sensitive data [19]. As a result, SGX has become a powerful security mechanism and has been widely adopted across numerous real-world systems and projects [20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35].
However, the interactions between SGX enclaves and the untrusted host environment introduce attack surfaces that can lead to memory corruption vulnerabilities, enabling adversaries to hijack enclave control flow, leak sensitive data, or compromise enclave integrity [35,36,37,38].
To mitigate memory corruption vulnerabilities in SGX applications, researchers have developed a range of detection techniques—such as TeeRex [39], COIN [40], Guardian [41], SymGX [42], and IntraFuzz [43]—which leverage symbolic execution, fuzzing, and other methods to uncover security flaws in various versions of Intel SGX SDK, ranging from 2.12 to 2.14 and above. In our evaluation, we focus on Intel SGX SDK version 2.14 and have demonstrated promising effectiveness.
However, these approaches still exhibit several fundamental limitations in practice:
  • Insufficient vulnerability taxonomy: Existing work lacks a systematic characterization of SGX memory corruption vulnerabilities. This results in reduced detection efficiency in large-scale analyses.
  • Coarse-grained pruning strategies: Most analysis tools prune paths at the function level during call-chain construction, failing to adequately distinguish differences in parameter taint states across distinct calling contexts. This coarse granularity frequently removes valid paths with unique taint-propagation behaviors, leading to false negatives
  • Inefficient call-chain exploration: Tools relying on depth-first search or random traversal struggle to reason about complex function interactions such as recursion and mutual calls, significantly degrading call-chain construction efficiency.
  • Lack of parameter-level taint modeling: Building call chains solely at the function level fails to capture parameter-specific taint information during call-chain backtracking. As a result, backtracking cannot accurately distinguish parameter taint information across different calling contexts, hindering the determination of taint flow across function boundaries and leading to the generation of false positives.
Building upon these challenges, we propose ParaTaintGX, a novel static analysis framework tailored for SGX applications, designed to efficiently detect memory corruption vulnerabilities. By systematically analyzing publicly available SGX projects, we extract characteristic vulnerability patterns that serve as the foundation for subsequent identification of SGX-specific memory corruption vulnerabilities.
Using Ghidra as our reverse-engineering framework, we construct the call chain by introducing a fine-grained call-chain node model that jointly characterizes each function and the taint locations of its parameters. This design significantly enhances the precision of taint propagation, reducing false negatives caused by coarse-grained pruning during call-chain construction, and mitigating false positives that arise from missing parameter-level taint information during backtracking.
Furthermore, we develop a multi-node heuristic priority search algorithm driven by this refined node model to prioritize the exploration of more promising call-chain nodes while avoiding redundant or irrelevant paths, thereby improving the efficiency of call-chain construction. Finally, we design a pruning algorithm tailored for our parameter-aware call-chain backtracking, which eliminates unnecessary backtracking steps and further boosts overall analysis performance.
We evaluated ParaTaintGX, IntraFuzz [43], SymGX [42], and TeeRex [39] using SGX applications and the OpenCVE database of publicly disclosed vulnerabilities. Our results show that ParaTaintGX reported 62 vulnerabilities, of which 12 were confirmed; TeeRex reported 4564 vulnerabilities, with 9 confirmed; SymGX reported 82 vulnerabilities, with 9 confirmed; and IntraFuzz reported 124 vulnerabilities, with 10 confirmed. These results clearly indicate that ParaTaintGX substantially outperforms the evaluated state-of-the-art tools in detecting memory corruption vulnerabilities.
In summary, our main contributions are as follows:
  • We classify vulnerability types using the OpenCVE database of publicly disclosed SGX vulnerabilities, identify common SGX vulnerability patterns, and extract characteristic features of these vulnerabilities.
  • To mitigate false negatives caused by pruning strategies during call-chain construction and false positives arising from context-insensitive parameter taint states during backtracking, we introduce a parameter-aware call-chain node model, which improves both the precision and reliability of call-chain analysis.
  • To address the inefficiency of call-chain exploration, we propose a multi-node heuristic priority search algorithm that prioritizes promising nodes and reduces redundant path traversals, thereby enhancing call-chain construction efficiency.
  • We design a pruning algorithm for link backtracking to eliminate unnecessary analyses during call-chain backtracking, further improving efficiency.
  • Based on these techniques, we implement ParaTaintGX, a tool for detecting memory corruption vulnerabilities in SGX programs. ParaTaintGX has been validated on multiple real-world vulnerability samples and open-source SGX projects, demonstrating high detection accuracy and analysis efficiency.
The rest of this paper is organized as follows. Section 2 introduces the background of SGX communication mechanisms and the underlying causes of memory corruption vulnerabilities. Section 3 introduces related work. Section 4 describes the architecture and design of ParaTaintGX. Section 5 presents the experimental results. Section 6 concludes the paper and discusses directions for future work.

2. Background

In this section, we review SGX communication between the untrusted and trusted execution environment, the potential memory corruption vulnerabilities that may result from such interactions, and the limitations of existing analysis tools.

2.1. SGX

SGX is a hardware-based security technology that enhances protection beyond traditional software defenses by providing hardware-enforced confidentiality and integrity for sensitive code and data. As illustrated in Figure 1, SGX enables applications to create isolated execution environments inside the CPU, known as enclaves. The enclave constitutes a protected memory region in which both code and data are encrypted and isolated, preventing access or tampering even from privileged system components such as the operating system or the BIOS. The remainder of the application is executed in the untrusted host environment. Direct communication between the enclave and the untrusted environment is not allowed. Instead, data exchange must occur through the ecall and ocall interfaces provided by the Intel SGX SDK [44]. The untrusted host invokes enclave functions via ecalls, whereas the enclave interacts with the untrusted environment through ocalls. By allowing developers to encapsulate sensitive code and data within enclaves, SGX ensures the confidentiality of memory contents and preserves the integrity of enclave-executed code.
These ecall and ocall interfaces are declared in the EDL file. Listing 1 uses the EDL file from the sgxwallet project for illustration:
  • enclave{}: This section serves as the root structure of the EDL file and defines the boundary of an enclave.
  • trusted{}: This section specifies the ecall interfaces exposed by the enclave to the untrusted environment, which can invoke these interfaces to execute specific enclave operations.
  • [in]: This parameter is an input pointer. The memory referenced by the pointer is treated as input, and the SGX SDK copies the data from the untrusted environment into the enclave after performing integrity and boundary checks.
  • [out]: This parameter is an output pointer, indicating that data is copied from inside the enclave to the corresponding buffer in the untrusted environment. The SGX SDK performs integrity checks prior to the data leaving the enclave.
  • [string]: This parameter indicates that the parameter is a null-terminated string. The SGX SDK applies additional validation and handling tailored to string parameters.
  • [count = size]: This parameter specifies the number of elements contained in the buffer pointed to by the parameter. The SGX SDK uses this information to conduct boundary checks, ensuring that memory copying operations remain within the expected bounds.
  • [user_check]: This parameter indicates that the SGX SDK does not automatically validate the pointer. Developers are responsible for performing the required safety and boundary checks manually.
Listing 1. EDL file in the sgxwallet project.
Mathematics 14 01007 i001

2.2. Memory Corruption Vulnerability

Although SGX provides strong hardware-level isolation, improper memory accesses in SGX applications have still resulted in numerous exploitable vulnerabilities [38,45,46,47,48,49,50,51,52,53,54,55,56]. These vulnerabilities primarily stem from out-of-bounds reads and out-of-bounds writes.
Out-of-bounds reads occur when data is copied from a pointer-referenced memory region to the untrusted environment without verifying whether the referenced address resides inside the enclave.
The absence of such validation may lead to unintended disclosure of confidential enclave data to the untrusted environment, thereby compromising enclave confidentiality.
For instance, CVE-2021-22552 [45] which is shown in Listing 2, is a representative out-of-bounds read vulnerability in SGX applications. The root cause lies in how the MessageReader component processes input: the enclave interprets the response_buffer supplied by the untrusted environment as a MessageReader object and subsequently accesses buffer parameters according to the parsed response_reader structure. This design implicitly assumes that response_buffer is trustworthy. As a result, the enclave directly dereferences offset-based fields (e.g., parameter_address(i)) derived from this structure. When an attacker forges a malicious response_buffer, the enclave follows these attacker-controlled offsets and reads arbitrary memory locations, ultimately exposing sensitive enclave data and triggering an out-of-bounds read vulnerability.
Out-of-bounds write vulnerabilities arise from the lack of a validation mechanism to determine whether the target memory address of a write operation resides within the enclave. Without such checks, sensitive enclave data may be overwritten, thereby compromising the integrity of the protected information.
For instance, CVE-2020-8937 [46], which is shown in Listing 3, is a representative out-of-bounds write vulnerability in SGX applications. The cause of this vulnerability lies in obtaining a queue pointer from the output, after which the function enc_untrusted_wait_queue_set_value proceeds to write data to the memory referenced by the queue pointer. Since the queue pointer is not validated to confirm that it resides within the enclave, an attacker who controls the queue pointer can write data into the enclave, thereby compromising the integrity of sensitive enclave data and resulting in an out-of-bounds write vulnerability.
Listing 2. SGX code with out-of-bounds read vulnerability.
Mathematics 14 01007 i002
Listing 3. SGX code with out-of-bounds write vulnerability.
Mathematics 14 01007 i003
Therefore, despite SGX’s strong hardware protections, memory corruption vulnerabilities in SGX applications remain a critical security concern. Detecting these vulnerabilities is essential for maintaining the security guarantees provided by SGX.

2.3. Shortcomings of Existing Analysis Tools

Unfortunately, existing tools such as TeeRex [39], COIN [40], SymGX [42], and IntraFuzz [43] approach specific types of SGX security issues primarily from the perspectives of symbolic execution or fuzzing.
However, they lack systematic analysis and characterization of memory corruption vulnerabilities in SGX projects, fail to implement fine-grained parameter-level taint modeling during call-chain construction, and adopt relatively inefficient call-chain exploration strategies for large search spaces.
Consequently, these tools suffer from high false positive rates, high false negative rates, and low efficiency in detecting such vulnerabilities, particularly under complex calling relationships.
During call chain construction, pruning is often performed at the function level, which results in low precision. Figure 2 illustrates such a scenario: when function A has few parameter taints, it cannot directly trigger a dangerous function.
However, if function B is invoked and subsequently calls function A again, the number of parameter taints in function A increases, ultimately enabling the dangerous function to be called.
In this case, function-level pruning alone may remove the critical path from function B to the heavily tainted function A, preventing the dangerous function from being reached and causing false negatives.
Furthermore, existing tools commonly employ relatively inefficient call chain construction strategies, such as depth-first search or random traversal, resulting in low overall efficiency and, in some cases, failure to complete within a finite time frame.
During call chain backtracking, the lack of fine-grained modeling of parameter-level taint states in existing tools prevents the distinction of parameter taint sources across different calling contexts, which can lead to false positives. As illustrated in Figure 3, when backtracking to function C, it may be unclear whether the current parameter taint state originates from function A or function B, which can lead to unrelated paths being misidentified as critical paths. Furthermore, existing tools often analyze all possible paths, including many unnecessary ones, resulting in inefficient call chain backtracking.
In summary, existing tools for SGX memory corruption vulnerability analysis still exhibit certain limitations in the systematic categorization of vulnerability characteristics, the precision of call chain construction in complex calling scenarios, and the efficiency of vulnerability analysis. To address these issues, We propose ParaTaintGX, a novel framework that ultimately enhances the accuracy and efficiency of SGX memory corruption vulnerability detection.

3. Related Work

Intel SGX, a cutting-edge hardware-based Trusted Execution Environment (TEE) technology, provides robust hardware protections for addressing data security and privacy concerns and has been extensively applied and studied in both academia and industry [26,27,28,29,30,31,32,33,34,57,58,59,60,61,62,63,64,65,66,67,68]. However, while offering these protections, the unique security model of SGX also introduces two new attack surfaces: side-channel attacks [69,70,71,72,73,74,75,76,77,78,79,80,81] and memory corruption vulnerabilities [38,39,40,41,42,48,49].
In the study of memory corruption vulnerabilities, Van Bulck et al. [49] revealed the inherent vulnerability of the enclave runtime environment; even when the enclave code itself is free of flaws, attackers may compromise its security by manipulating runtime libraries that mediate interactions between the enclave and the external environment. TeeRex [39] employs a symbolic execution engine to identify exploitable memory corruption primitives and explore the execution paths of enclave code. COIN [40] systematically examines the enclave attack surface along four dimensions—inputs, call sequences, concurrency, and nesting—by modeling adversarial interactions with enclave interfaces under these conditions. Guardian [41] employs symbolic execution to analyze SGX enclave code and verify whether data originating from the untrusted environment—such as ECALL parameters and OCALL return values—are properly validated, thereby identifying vulnerabilities arising from missing or insufficient input checks. SymGX [42] targets pointer operations that cross the trusted and untrusted boundaries of SGX applications, employing static symbolic execution to detect potential memory corruption vulnerabilities, while taking into account the multi-entry points and stateful execution characteristics of SGX applications. SGXFuzz [81] synthesizes nested pointer structures/size fields via fault signals, runs enclaves natively without SGX hardware, and detects memory corruption by mutating pointer locations to validate trust-boundary checks. FuzzSGX [82] parses EDL files for ECALL/OCALL interfaces, infers dependencies via static analysis and symbolic execution, generates host apps, and leverages a dedicated runtime to detect memory corruption and data races. EnclaveFuzz [35] extracts input structures/dependencies from enclave sources and EDL files, generates harnesses, fuzzes three input dimensions, and leverages an SGX-specific sanitizer and optimized SDK to detect memory corruption and SGX-specific vulnerabilities. IntraFuzz [43] uses an intra-enclave tracer, shared memory-based process management, and crash analysis via stack trace parsing to detect memory corruption vulnerabilities.
The works most closely related to ParaTaintGX include vulnerability detection tools such as IntraFuzz, SymGX, TeeRex, COIN, and other similar approaches [43,81]. However, these methods suffer from several limitations: unclear characterization of vulnerability features specific to SGX projects, inefficient search strategies during call-chain construction, and imprecise modeling of parameter-level taint states. When applied to complex calling relationships and parameter-sensitive SGX memory corruption vulnerabilities, these shortcomings result in constrained pruning precision and an inability to accurately trace taint propagation paths. Consequently, they are prone to generating false positives or false negatives in certain scenarios, ultimately leading to suboptimal effectiveness in detecting SGX memory corruption vulnerabilities.

4. Research Method

In this section, we first introduce the core components of ParaTaintGX, with a primary focus on its taint analysis architecture. We then illustrate how ParaTaintGX constructs call chains by treating the Function and Parameter Taint State as the fundamental analysis unit and leveraging a multi-node heuristic priority search algorithm. Finally, we present an efficient pruning strategy for call chain backtracking.

4.1. Framework

Figure 4 illustrates a taint analysis architecture designed according to SGX vulnerability patterns. The architecture consists of two major components: a call chain construction mechanism that adopts the "Function and Parameter Taint State” as its fundamental analytical unit, and a taint backtracking approach driven by the constructed call chains.
To construct call chains under the "Function and Parameter Taint State” abstraction, we begin by creating fine-grained call chain nodes corresponding to functions that contain taint sources and the entry-point taint states of their parameters. These nodes serve as entry points for analyzing the pcode intermediate representation of the associated functions and for performing intra-procedural taint propagation. When a new function call is identified in the intermediate code, if a node representing that function and its entry-point parameter taint states already exists, pruning is applied to avoid creating duplicate nodes; otherwise, a new fine-grained call chain node is instantiated based on the new function and its entry-point parameter taint states. This node is then linked with its predecessor node to extend the call chain. This procedure proceeds iteratively; however, instead of expanding nodes in a predetermined order, the exploration of the call chain is guided by a multi-node heuristic priority search algorithm. Specifically, newly generated nodes are inserted into a priority queue, and a heuristic scoring function is used to dynamically select high-priority nodes for further expansion, enabling an efficient and targeted construction of relevant call chains.
In the call-chain-based taint backtracking phase, we use the sink nodes collected during call chain construction to trace the corresponding taint propagation paths via our backtracking algorithm, ultimately generating vulnerability reports.

4.2. Call Chain Construction Based on Function and Parameter Taint State as the Fundamental Unit

In traditional static analysis, a call graph is modeled as a directed graph G = ( V , E ) . The vertex set V contains nodes representing program functions, where each node v i corresponds to a function identifier f i .The edge set E consists of directed edges, and an edge e i j = ( v i , v j ) denotes that function f i invokes function f j . A call chain is defined as a path within the graph G, typically denoted as C = < v 1 , v 3 , v 7 …, v k >, meaning that function f 1 calls f 3 , f 3 calls f 7 , and this continues until reaching f k .
However, traditional static analysis methods alone cannot capture information about parameter taint states during call chain construction and backtracking. To address this limitation, we design a call chain node that uses the Function and Parameter Taint State as its basic unit. We define a more fine-grained call chain node in the call graph as V = ( f , M , D , T , N , P ) , represented as a sextuple:
  • f: The function identifier, consistent with the meaning of a call chain node in traditional call graphs.
  • M { 0 , 1 } n : A taint bit vector indicating the taint states of the n parameters of function f, where a value of 1 indicates a tainted parameter, while 0 indicates a clean parameter.
  • T = | M | = i = 1 n b i : The total number of tainted parameters in the current function.
  • D = depth ( f ) : The length of the shortest path in the call chain from the taint source to function f.
  • N = | succ ( V ) | : The number of direct successor nodes reachable from the current node.
  • P = { ( V pre , π ) π denotes the propagation path from f pre to f current , and ( V pre , V current ) E } : Indicates which function is called the current function and records the corresponding propagation path.
This sextuple design allows precise tracking of parameter taint states, improving the accuracy of call chain construction and backtracking in static analysis of SGX applications.
The structure of ParaTaintNode is illustrated in Listing 4. The fields taintsNum (number of tainted parameters), depth (shortest call depth from the taint source), and callNum (number of successor ParaTaintNodes) are primarily used in our multi-node heuristic priority search algorithm. The taintBitMap and address fields record the taint positions of the function, which are utilized to determine whether a ParaTaintNode has already been created during call chain construction for pruning purposes, and to assist the pruning process during call chain backtracking.The preParaTaintNodes field stores predecessor nodes to facilitate call chain backtracking and to maintain the corresponding taint propagation paths.
Listing 4. ParaTaintNode Structure.
Mathematics 14 01007 i004

4.2.1. ParaTaintNode for Mitigating Pruning False Negatives

During call chain construction, the complexity of function call relationships, including recursive and mutually recursive calls, often leads to loops and duplicate paths, which reduces the efficiency of call chain construction. To address this, the traditional call chain pruning strategy avoids revisiting nodes that have already been visited. Formally, given a call chain G = ( v 1 , e 12 ) , ( v 2 , e 23 ) , ( v 3 , e 34 ) , , ( v i , e i k ) , if the next node v k to be added satisfies v j G such that v j = v k for some ( j { 1 , 2 , 3 , 4 , , i } ) , then v k is pruned.
However, if pruning relies solely on functions as the basic unit, it may reduce duplicate paths and cycles, but it treats a function as a unique identifier and ignores that the same function may exhibit different behaviors under different parameter taint conditions. As a result, this strategy can lead to false negatives in the analysis.
As illustrated in Figure 5 and Listing 5, after the first invocation of e_get_result, subsequent functions such as e_mpz_add are executed, and result is updated to point to a valid internal enclave buffer with an actual length of len_result. When e_get_result is invoked again, it copies the contents of this enclave buffer to external memory. If an attacker can influence the parameter len, i.e., if len becomes tainted, this second invocation may result in an out-of-bounds read from the enclave buffer. However, under a function-level call chain construction strategy, this subsequent invocation of e_get_result is pruned for efficiency, causing the security-critical propagation path to be mistakenly discarded.
Therefore, in our Call Chain design, the ParaTaintNode incorporates a taint bitmap (taintBitMap) to explicitly record the taint status of the function’s parameters. The bitmap establishes a one-to-one correspondence between each parameter and a binary indicator, expressed as M = ( b 1 , b 2 , , b n ) , b i { 0 , 1 } , where
b j = 1 , j -th parameter of the function is taint 0 , j -th parameter of the function is not taint
Listing 5. False Negatives in SGX Code Due to Pruning.
Mathematics 14 01007 i005
When the j-th parameter of a function is tainted, its corresponding bit b j is set to 1; otherwise, b j is set to 0. As illustrated in Figure 6, a taintBitMap value of 5—whose binary representation is 0101—indicates that the first and third parameters of the function represented by this ParaTaintNode are tainted.
By using the taintBitMap, we refine the pruning condition such that, in addition to matching function identities, the parameter taint configuration must also be consistent. Formally, let G = ( v 1 , e 12 ) , ( v 2 , e 23 ) , ( v 3 , e 34 ) , , ( v i , e i k ) , where v j = ( f j , M j , D j , T j , N j , P j ) and v j G , and v k = ( f k , M k , D k , T k , N k , P k ) . The next node v k is pruned only if both the function identifiers match f j = f k and their taintBitMap are identical M j = M k .
As illustrated in Algorithm 1, if the newly invoked function does not appear in previously generated call nodes (line 3), or it exists but with a different parameter taint state (line 6), then the corresponding ParaTaintNode has not been created yet (line 11). In this case, a new ParaTaintNode is instantiated and inserted into the priority queue prio_queue. Conversely, if the function already exists in prior call nodes with an identical taint bitmap, it indicates that this ParaTaintNode has already been generated during earlier Call Chain construction (line 9). Therefore, the node does not need to be traversed again and can be safely pruned.
Algorithm 1 ParaTaintNode Matching Algorithm
Input: 
Set of all created ParaTaintNode nodes ParaTaintNodeList, address of newly called function address, taint position bitmap of current function taintBitMap
Output: 
Node paraTaintNode
1:
function  getParaTaintNode (ParaTaintNodeList, address, taintBitMap)
2:
     for paraTaintNode ∈ ParaTaintNodeList do
3:
        if paraTaintNode.address ≠ address then                                   ▹ Check function address match
4:
           continue                                                       ▹ Different function
5:
        end if
6:
        if paraTaintNode.taintBitMap ≠ taintBitMap then                      ▹ Compare parameter taint state under same address
7:
           continue                                                        ▹ Different taint state
8:
        end if
9:
        return paraTaintNode                                                 ▹ Existing node found
10:
    end for
11:
    return null                                                      ▹ No matching node exists
12:
end function

4.2.2. Multi-Node Heuristic Priority Search Algorithm

If Call Chain construction relies on depth-first search or purely random traversal, several challenges emerge:
1.
The explosive number of Call Chains renders effective path identification infeasible.
2.
The chain lengths may grow excessively.
3.
Irrelevant nodes that do not contribute to taint propagation may be explored.
4.
Numerous redundant paths may be repeatedly visited, ultimately degrading efficiency and potentially preventing the analysis from being completed within a practical time frame.
To address problems 1 and 2, let G = ( V , E ) denote the call graph, where V is the set of function nodes and E is the set of call edges. Let Path ( G ) denote the set of all paths from source nodes to reachable nodes in G. Under unconstrained depth-first search (DFS) traversal, the total number of paths grows exponentially with the call depth:
| Path explored ( G ) | = b + b 2 + b 3 + + b d = i = 1 d b i
In the Formulae (1), b is the average branching factor and d is the maximum call chain depth. When b and d are large, the number of paths explodes, making it computationally infeasible to efficiently identify vulnerability-relevant paths through exhaustive traversal.
To address these challenges, we transform the unconstrained search into a heuristic-guided priority search. We define a priority score function Score ( v ) for each unvisited ParaTaintNode v G , where nodes with higher scores are considered more likely to reach sink functions and are therefore expanded first.
We maintain a priority queue Q that stores all unvisited ParaTaintNodes ordered by their scores in descending order. Formally, for any two nodes V i , V j Q :
V i precedes V j in Q Score ( V i ) > Score ( V j )
At each iteration, the algorithm dequeues the node with the highest score from Q for expansion.
The priority score for a ParaTaintNode V is defined as
Score ( V ) = w 1 · N + w 2 · T Reward term R ( V ) w 3 · ( D ) α Penalty term D ( V )
In the Formulae (3):
  • N = | succ ( V ) | represents the branching factor of node V, i.e., the number of potential callee functions reachable from V;
  • T is the number of tainted parameters, reflecting the taint propagation potential;
  • D = depth ( V ) is the shortest call chain distance from the source function to V, which penalizes nodes that are too far from the source;
  • The weights w 1 = w 2 = 0.4 , w 3 = 0.2 , and exponent α = 1.2 are empirically calibrated on a validation set of SGX applications.
The reward term R ( V ) = w 1 N + w 2 T captures the local taint propagation potential. Intuitively, nodes with more outgoing edges (larger N) offer more opportunities to propagate taint to subsequent functions, while nodes with more tainted parameters (larger T) have higher likelihood of triggering dangerous operations. Hence, nodes with higher reward scores are prioritized for exploration.
The penalty term D ( V ) = w 3 D α introduces a non-linear depth penalty. This term discourages the exploration of excessively long call chains by reducing the priority of nodes far from the source, while the exponent α > 1 ensures that the penalty grows super-linearly with depth. This design preserves the possibility of reaching deeply nested but relevant paths while mitigating the impact of path explosion caused by unbounded depth.
The weighting parameters ( w 1 = w 2 = 0.4 , w 3 = 0.2 , and α = 1.2 ) are determined through a systematic experimental tuning procedure on a validation set of SGX applications. Equal weights are assigned to N and T to reflect their respective contributions to taint propagation potential. The depth penalty weight w 3 is set to a relatively low value in order to avoid overly aggressive pruning of deeply nested yet potentially relevant paths, while still discouraging unnecessary exploration. The exponent α introduces a mild nonlinear growth in the depth penalty, enabling a balanced trade-off between analysis completeness and efficiency. Our experimental results indicate that moderate variations of these parameters do not significantly affect detection outcomes, suggesting that the scoring function is robust with respect to parameter selection.
Unlike the exhaustive DFS described in Formula (1), our heuristic-guided priority search selectively expands only a subset of nodes. Let p i denote the probability that a node at depth i is selected for expansion. Due to the depth penalty term D ( V ) , we have
p 1 < 1 , p 2 p 1 , p 3 p 2 , , p d 1
Importantly, not all nodes at a given depth are selected; each node’s selection probability is independently governed by the priority score. The expected number of explored paths is
| Path explored ( G ) | = i = 1 d b i · p i
Since p i decays rapidly with depth ( p i 0 as i increases), the contribution of deeper layers becomes negligible, effectively mitigating the path explosion problem.
In summary, the priority value of a ParaTaintNode is computed by summing the number of functions it can call and the number of its parameter taints, and then subtracting its shortest path length. This design encourages the exploration of new ParaTaintNode nodes, prioritizes nodes more likely to reach sink functions, and mitigates the negative impact of excessively long call chains on analysis efficiency.
As shown in Algorithm 2, we customize a PriorityQueue by defining a dedicated Comparator to order stored ParaTaintNode instances according to a predefined scoring function. Specifically, the compare method of the Comparator interface is overridden (line 2) to establish the node comparison logic. For two ParaTaintNode objects, denoted as node1 and node2, their corresponding scores, score1 and score2, are first computed (line 3 and line 4). The nodes are then sorted in descending order using Double.compare (score2, score1) (line 5), ensuring that the priority queue consistently processes taint nodes with higher scores first.
Algorithm 2 Priority Queue Comparator
Input: 
Two ParaTaintNode instances node1 and node2
Output: 
Integer where:
-
positive value: node2 has higher priority than node1,
-
zero: node1 and node2 have equal priority,
-
negative value: node1 has higher priority than node2
1:
Define Comparator <ParaTaintNode> taintNodeComparator:              ▹ Custom comparator for ParaTaintNode priority ordering
2:
function compare(node1, node2)
3:
    score1 ← w1 * node1.taintsNum + w2 * node1.callNum − w3 * Math.pow(node1.depth, alpha)             ▹ Calculate priority scores
4:
    score2 ← w1 * node2.taintsNum + w2 * node2.callNum − w3 * Math.pow(node2.depth, alpha)
5:
    return Double.compare(score2, score1)                                ▹ Descending order (higher score first)
6:
end function
To address problem 3, if all parameters of a newly invoked function are clean, neither this function nor the functions it subsequently calls can contribute to taint propagation. However, conventional call-chain construction algorithms still include such functions, resulting in a large number of ineffective paths. Therefore, when performing taint analysis on the Pcode intermediate representation of the function associated with a ParaTaintNode, we evaluate whether any of its parameters are tainted. If no taint exists—i.e., V(T) = 0 or V(M) = (0, 0, 0, …, 0)—the function and its subsequent paths are excluded from further analysis.
Algorithm 3 illustrates how call chain construction is integrated with intra-function taint propagation to analyze taint flows within the current function. Based on the call opcode in pcode and the taint status of function parameters, the algorithm determines whether a new mapping to a callee function should be established by creating a corresponding ParaTaintNode. Initially, the taint propagation path is initialized (line 2), and the control flow graph of the target function is retrieved (line 3). Using the source information contained in the current ParaTaintNode, the relevant basic blocks are identified and inserted into an initial worklist (line 5). The algorithm then enters the main loop, iterating over all basic blocks in the worklist. Within each basic block, all pcode instructions are processed sequentially (line 11). For each instruction, taint propagation is performed to update both the taint set and the associated propagation path (line 12). When a call opcode is encountered, a critical decision is made (line 13). If any input varnode of the call instruction is tainted, the target function address is extracted, and a taint bitmap for the callee’s parameters is computed. A new ParaTaintNode is then created and inserted into the priority queue as well as the global node list (line 16). This newly created node is linked to the current paraTaintNode, thereby extending the call chain while preserving the taint propagation path. If the new node corresponds to a sink function, such as strcpy, memcpy, or snprintf, which are representative data-copy-related functions, it is added to the sinkParaTaintNodeList for subsequent backward analysis (line 17). After all pcode instructions within a basic block have been processed, the resulting taint set is associated with that block (line 22). The algorithm continues processing remaining basic blocks in the worklist until the list is exhausted, completing intra-function taint propagation for the current function.
Algorithm 3 Taint Propagation Analysis Function Algorithm
Input: 
Taint analysis function func, call chain node paraTaintNode, dangerous function node set sinkParaTaintNodeList, priority queue priority_queue, set of all created nodes ParaTaintNodeList
Output: 
No return value
1:
function funcTaintsFlow(func, paraTaintNode, sinkParaTaintNodeList, priority_queue, ParaTaintNodeList)
2:
    path ← initPath()                                                                ▹ Initialize taint propagation path
3:
    cfg ← getCfg(func)                                                                 ▹ Extract control flow graph
4:
    sourceBlock ← getSourceBlock(cfg, getSource(paraTaintNode))
5:
    basicBlockList ← InitWorkList(sourceBlock)                                                 ▹ Initialize worklist with source blocks
6:
    while basicBlockList ≠ null do
7:
        basicBlock ← getBasicBlock(basicBlockList)
8:
        addSuccBasicBlockToWorklist(basicBlockList, basicBlock)                                               ▹ Add successors to worklist
9:
        taintSet ← getTaintSetByPreBasicBlock(basicBlock)                                              ▹ Merge taint sets from predecessors
10:
        pcodes ← getPcodeByBasicBlock(basicBlock)                                               ▹ Get intermediate representations pcode
11:
        for pcode ∈ pcodes do
12:
           taintFlow(pcode, taintSet, path)                                                      ▹ Propagate taints and update path
13:
           if getOpcode(pcode) = = CALL and inVarnode ∈ taintSet then
14:
               targetFuncAddr ← getAddress(pcode)                                                       ▹ Extract callee address
15:
               taintBitMap ← getTaintBitMap(pcode, taintSet)
16:
               newParaTaintNode ← AddNewParaTaintNode(priority_queue, ParaTaintNodeList, paraTaintNode, targetFuncAddr, taintBitMap, path) ▹ Create new call chain node and establish link
17:
               if isSinkFunction(newParaTaintNode) then
18:
                   addSinkParaTaintNodeList(newParaTaintNode, sinkParaTaintNodeList)    ▹ Add sink nodes corresponding to data-copy-related sink functions (e.g., strcpy, memcpy, snprintf)
19:
               end if
20:
           end if
21:
        end for
22:
        basicBlock ← AddtaintSet(basicBlock, taintSet)                                                 ▹ Attach final taint set to basic block
23:
    end while
24:
end function
To address problem 4, when loops or mutually recursive calls occur within the program, our modeling strategy—where each distinct ParaTaintNode is uniquely defined by its function and associated parameter taint state—allows us to enforce a single-visit policy for each node. This effectively prevents redundant exploration of call paths arising from cyclic or mutually recursive structures.
Accordingly, we maintain a ParaTaintNodeList that records all ParaTaintNode instances created during call chain construction. Before inserting a new ParaTaintNode into the prio_queue, we first check whether it already exists in this list. If so, the node is not re-created or re-enqueued. In this way, ParaTaintNodeList guarantees that each ParaTaintNode is processed at most once.
Algorithm 4 illustrates the construction procedure of a ParaTaintNode, which enforces that each node is visited at most once. After taint propagation identifies the functions invoked by the current function, the getParaTaintNode method determines—based on the callee’s address and its parameter taint state—whether a corresponding ParaTaintNode already exists in the previously constructed Call Chain (line 3). If such a node is found, it is excluded from reinsertion into the priority queue prio_queue; instead, only its predecessor reference (line 8) and shortest path distance (line 7) are updated. Conversely, if no existing node matches the current function invocation, a new ParaTaintNode is initialized (line 4) and inserted into prio_queue for subsequent exploration (line 5).
Algorithm 4 Adding New ParaTaint Node Algorithm
Input: 
Priority queue priority_queue, set of all created nodes ParaTaintNodeList, predecessor node preParaTaintNode, current function address targetFuncAddr, parameter taint bitmap taintBitMap, taint propagation path from predecessor node to current node path
Output: 
Call chain node newParaTaintNode
1:
function AddNewParaTaintNode(priority_queue, ParaTaintNodeList, preParaTaintNode, targetFuncAddr, taintBitMap, path)
2:
    newParaTaintNode ← getParaTaintNode(ParaTaintNodeList, targetFuncAddr, taintBitMap) ▹ Check if node already exists
3:
    if newParaTaintNode = = null then
4:
        newParaTaintNode ← new ParaTaintNode(getTaintsNum(taintBitMap), preParaTaintNode.depth + 1 , getCallNum(address), taintBitMap, address) ▹ Initialize new node(prevents redundant analysis)
5:
        addParaTaintNode(priority_queue, ParaTaintNodeList, newParaTaintNode)▹ Add to priority_queue and ParaTaintNodeList
6:
    end if
7:
    newParaTaintNode.depth ← min(preParaTaintNode.depth + 1 , paraTaintNode.depth) ▹ Update minimal call chain depth
8:
    addPreParaTaintNode(newParaTaintNode, preParaTaintNode, path)▹ Establish predecessor link with propagation path
9:
    return newParaTaintNode
10:
end function

4.2.3. Path Backtracking

After the call chain construction is completed, we backtrack from the ParaTaintNode associated with the dangerous function to the ParaTaintNode corresponding to the source function. Since each ParaTaintNode records the taint propagation segment from its predecessor to itself, concatenating these segments along the same chain yields the final taint propagation path.
In the call chain backtracking process, considering only inter-function invocation relationships without incorporating taint flow semantics may incorrectly classify non-taint-related paths as dangerous, thereby producing false positives. As illustrated in Listing 6, the actual vulnerable paths are ecall_process_network → internal_function_B → ocall_write_to_network and ecall_process_log → internal_function_B → ocall_write_to_log. However, if the Call Chain is built solely based on function invocation relationships, the case depicted in Figure 7 can arise. During call chain backtracking, the absence of parameter-level taint information prevents us from distinguishing the true data-dependent path, potentially leading to an incorrect interpretation such as ecall_process_network → internal_function_B → ocall_write_to_log, which ultimately causes false positive reports.
By adopting our call chain construction method that treats the "Function and Parameter Taint State" as the fundamental analysis unit, these false positives are effectively eliminated. As illustrated in Figure 8, the backtracking process ultimately yields two valid taint propagation paths, both of which actually exist in the program.
Moreover, after constructing the Call Chain using ’Function and Parameter Taint State’ as the basic abstraction unit, some redundant paths may still remain in the resulting chain. These irrelevant chains introduce unnecessary overhead and therefore degrade efficiency during the subsequent backtracking phase.
Listing 6. False Positive Example in Path Backtracking.
Mathematics 14 01007 i006
To eliminate redundant backtracking paths, we formalize a taint-aware pruning strategy based on subset comparison of taint bitmaps.
For two ParaTaintNodes, V i = ( f i , M i , D i , T i , N i , P i ) and V j = ( f j , M j , D j , T j , N j , P j ) , with the same function identifier ( f i = f j ), we say that V i is taint-subsumed by V j , denoted as V i V j , if and only if
f i = f j and M i M j
During backtracking from sink to source, let P cur = V cur , V prev 1 , V prev 2 , , V sink be the current path under exploration. Let V cur be the current node. If there exists a previously visited node V prev P cur such that
V prev V cur
then further backtracking from V cur is pruned. This process is illustrated in Algorithm 5.
Algorithm 5 Pruning Condition Check
Input: 
Previously visited node kParaTaintNode, current node currentParaTaintNode
Output: 
Boolean indicating whether pruning is applicable
1:
function AddNewParaTaintNode(kParaTaintNode, currentParaTaintNode)
2:
    if  ( k P a r a T a i n t N o d e . t a i n t B i t M a p & c u r r e n t P a r a T a i n t N o d e . t a i n t B i t M a p ) = = k P a r a T a i n t N o d e . t a i n t B i t M a p  then
3:
        return True                             ▹ Pruning applicable
4:
    else
5:
        return False                          ▹ Continue forward tracing
6:
    end if
7:
end function

4.2.4. Precision–Efficiency Trade-Off

Static analysis tools for vulnerability detection often face a fundamental trade-off between precision and efficiency. Highly precise analysis typically requires fine-grained modeling of program states, which can significantly increase the analysis space and computational overhead. Conversely, aggressive pruning and coarse-grained modeling may improve efficiency but often introduce false positives or false negatives.
ParaTaintGX is designed to balance this trade-off through a combination of fine-grained taint modeling and heuristic exploration strategies.
ParaTaintGX improves detection precision by introducing the ParaTaintNode model, which represents a function together with its parameter taint state. Compared with traditional function-level call graph nodes, this representation distinguishes different invocation contexts based on the differences in parameter taint. As a result, ParaTaintGX can avoid incorrect pruning of vulnerability-relevant paths and significantly reduce false negatives during call-chain construction.
However, parameter-level taint modeling may increase the number of potential analysis states. To mitigate this overhead and maintain scalability, ParaTaintGX integrates two efficiency-oriented mechanisms.
First, a multi-node heuristic priority search algorithm is adopted to guide the exploration of the call graph. By prioritizing nodes with larger taint propagation potential and shorter distances to the source, the algorithm focuses on paths that are more likely to reach vulnerability sinks, thereby reducing unnecessary exploration of irrelevant call chains.
Second, ParaTaintGX introduces a taint-state-aware pruning strategy during backward tracing. If the taint state of a newly visited node contains that of a previously visited node, further exploration of that path is pruned. This strategy effectively eliminates redundant analysis paths while preserving vulnerability-relevant propagation chains.
Through the combination of parameter-sensitive taint modeling, heuristic exploration, and taint-aware pruning, ParaTaintGX achieves a practical balance between analysis precision and computational efficiency.

5. Evaluation

In this section, we collected publicly available SGX applications to conduct an experimental evaluation of our proposed method. To comprehensively assess the performance of ParaTaintGX, we formulated the following research questions:
RQ1: 
How effective is ParaTaintGX in detecting known vulnerabilities?
RQ2: 
How effective is ParaTaintGX in identifying vulnerabilities in real-world SGX applications?
RQ3: 
How accurate are the vulnerability reports generated by ParaTaintGX in real-world SGX applications?
RQ4: 
Can ParaTaintGX achieve higher code coverage than baseline approaches?
RQ5: 
How does ParaTaintGX perform without the multi-node heuristic priority search algorithm?

5.1. Test Set

We collected 27 SGX-related applications from GitHub [83], successfully compiled them and selected 10 representative SGX applications [84,85,86,87,88,89,90,91,92,93]. In addition, we selected 12 publicly available CVE vulnerabilities from SGX projects such as Asylo and sgxwallet [45,46,47,50,51,52,54,55,56,94,95,96]. Based on an in-depth analysis of their underlying vulnerability mechanisms, we manually reproduced these vulnerabilities and implemented corresponding test programs, which were subsequently used as a benchmark for evaluation. These selected applications and vulnerabilities are widely representative, allowing a more comprehensive evaluation of our proposed approach.
The details of the open-source GitHub applications are presented in Table 1. For each GitHub application, we have collected the number of OCall entries (#.OCall) and ECall entries (#.ECall), which reflect the complexity of the SGX applications.

5.2. Experimental Setup

ParaTaintGX, developed based on the Ghidra framework, serves as our analysis tool. All experiments were conducted on a Windows 11 PC equipped with an AMD Ryzen 7 5800H CPU and 16 GB of memory.
In our experiments, all data flowing from the untrusted environment to the trusted enclave environment are considered as sources. This includes pointer-type parameters in ECall interfaces as well as memory regions allocated from the external operating system via OCall. Furthermore, all parameters of functions that perform memory copy operations are defined as sinks to accurately capture potential out-of-bounds read and write behaviors.
To accurately evaluate the vulnerability detection capabilities of ParaTaintGX, we selected three industry-recognized state-of-the-art SGX vulnerability detection tools—IntraFuzz, SymGX, and TeeRex—as baseline tools for comparison. All factors were kept constant, and a time limit of 12 h was set to avoid any bias arising from differences among the tools.

5.3. Detection Performance on Known Vulnerabilities

To answer RQ1, we evaluated all tools using a vulnerability set comprising 12 real CVEs. The assessment metrics included Precision, Recall, F1-Score and Average Detection Time. Precision quantifies the accuracy of the system and is defined as the ratio of true positives (TP) to the total number of reported cases (true positives (TP) plus false positives (FP)):
Precision = T P T P + F P
Recall measures the completeness of detection and is defined as the ratio of true positives to the total number of actual vulnerabilities (true positives (TP) plus false negatives (FN)):
Recall = T P T P + F N
The F1-Score provides a balanced measure combining both Precision and Recall:
F 1 - Score = 2 × Precision × Recall Precision + Recall
Average Detection Time measures the average time consumed by a tool to complete one full vulnerability detection cycle on a single CVE test set. Cases exceeding the predefined time limit are considered failures.
We evaluated ParaTaintGX, IntraFuzz, SymGX, and TeeRex on a test set comprising 12 CVEs. For each tool, we measured the numbers of true positives (TP), false positives (FP), false negatives (FN) and the average detection time (ADT). The computed core performance metrics are summarized in Table 2 and illustrated in Figure 9.
ParaTaintGX successfully detected 9 of the 12 vulnerabilities, achieving a recall of 75%. This result outperforms IntraFuzz (58.3%), SymGX (50%), and TeeRex (41.7%). In terms of the F1-score, ParaTaintGX achieved 0.620, which is significantly higher than SymGX (0.399), IntraFuzz (0.291), and TeeRex (0.009). These results indicate that ParaTaintGX provides a better balance between detection accuracy and completeness.
Regarding detection efficiency, ParaTaintGX required an average of 11.12 ± 3.26 min to analyze a vulnerability case. This is substantially faster than IntraFuzz (26.24 ± 8.13 min) and TeeRex (31.17 ± 6.14 min), and slightly faster than SymGX (12.90 ± 3.66 min).
To further assess the detection capabilities of ParaTaintGX, we analyzed the False Negative Rates (FNR) of ParaTaintGX, SymGX, IntraFuzz, and TeeRex across two vulnerability categories: out-of-bounds read and out-of-bounds write vulnerabilities. This analysis was conducted on the same set of 12 publicly disclosed CVEs.
As illustrated in Figure 10, ParaTaintGX achieves the lowest overall FNR among all evaluated tools.
For out-of-bounds read vulnerabilities, ParaTaintGX achieves an FNR of 28.5%, which is substantially lower than that of IntraFuzz (42.9%), SymGX (57.1%), and TeeRex (71.4%).
For out-of-bounds write vulnerabilities, the FNR of ParaTaintGX further decreases to 20%. In comparison, IntraFuzz, SymGX, and TeeRex all exhibit an FNR of 40%.
These results demonstrate that ParaTaintGX maintains superior detection capability across different vulnerability categories when compared with the baseline tools.

5.4. Vulnerability Detection Effectiveness

To answer RQ2, we evaluated ParaTaintGX and three baseline tools on a dataset containing 10 real-world SGX applications.
The vulnerability reports generated by the tools were manually verified to ensure correctness. The verified results are summarized in Table 3. In the table, the column ‘alerts’ represents the total number of vulnerability reports generated by each tool, while ‘vul’ denotes the number of vulnerabilities confirmed through manual validation.
Across the evaluated applications, ParaTaintGX identified a total of 12 vulnerabilities. In comparison, IntraFuzz detected 10 vulnerabilities, while both TeeRex and SymGX detected only 9.
These results indicate that ParaTaintGX is capable of discovering more vulnerabilities than the baseline tools, demonstrating its effectiveness in detecting security issues in real-world SGX applications.

5.5. Precision of Vulnerability Reports

Detection rate alone is insufficient for evaluating vulnerability detection tools. Precision is also a critical metric because a large number of false positives can obscure real vulnerabilities and significantly increase the manual auditing effort required from developers.
To answer RQ3, we conducted vulnerability mining experiments on 10 open-source SGX applications and compared the precision of ParaTaintGX with three baseline tools. The detailed results are summarized in Table 3. Precision is defined as the ratio of confirmed vulnerabilities (Vul) to the total number of reported alerts (Alerts).
Precision = Vul Alerts
The results reveal that TeeRex produces a large number of false positives. It reported 4564 potential vulnerabilities, but only 9 were confirmed as real vulnerabilities after verification, yielding a precision of only 0.2%. For example, in the Sgxwallet project, TeeRex generated 273 vulnerability reports, but only one real vulnerability was confirmed. This significantly increases the effort required for manual verification.
In comparison, IntraFuzz and SymGX achieve higher precision. IntraFuzz reported 124 vulnerabilities and identified 10 real vulnerabilities, resulting in a precision of 8.06%. SymGX reported 82 vulnerabilities, with 9 confirmed cases, achieving a precision of 10.98%.
ParaTaintGX generated 62 vulnerability reports, of which 12 were confirmed as real vulnerabilities. This results in a precision of 19.35%, which significantly outperforms SymGX (10.98%). The comparison is illustrated in Figure 11.

5.6. False Positive Analysis

By analyzing false positive cases, we have identified two main sources. First, inaccuracies in pointer analysis: the intermediate code layer has limited expressiveness for memory aliases and pointer offsets, leading to ambiguous taint propagation through memory pointers. This inaccuracy in taint analysis ultimately results in false positives. Second, incomplete modeling of boundary check semantics: some programs already incorporate effective boundary protection mechanisms that are not explicitly recognized by ParaTaintGX, consequently generating false positives.
We conducted a quantitative attribution analysis on 50 false positive cases: 32 cases (64%) originated from inaccuracies in pointer analysis, while the remaining 18 cases (36%) were attributed to incomplete modeling of boundary check semantics.

5.7. Code Coverage

To answer RQ4, we conducted a systematic comparative analysis of the code coverage achieved by ParaTaintGX and three baseline tools on real SGX applications, aiming to assess the practical contribution of our method to code coverage. The complete results are presented in Figure 12. Overall, ParaTaintGX achieved the highest code coverage across all tested applications, with an average coverage of 59.45%, significantly outperforming SymGX (48.33%), TeeRex (38.98%), and IntraFuzz (17.51%). This result indicates that ParaTaintGX is able to explore more effective code regions related to taint propagation within a limited analysis time.
This advantage can be attributed to our designed multi-node heuristic priority search algorithm. This mechanism enables the prioritized exploration of call-chain nodes that are more likely to reach dangerous functions, thereby avoiding the waste of analysis resources on a large number of irrelevant or low-value paths. It also effectively addresses the decline in analysis efficiency caused by excessively long call chains and reduces analysis redundancy for complex calling structures through pruning. Ultimately, ParaTaintGX achieves higher code coverage.

5.8. Ablation Study

To answer RQ5, we evaluate the effectiveness of the Multi-node Heuristic Priority Search Algorithm in ParaTaintGX by comparing the tool’s performance with and without this algorithm in terms of code coverage and vulnerability detection capability.
Figure 12 and Table 3 present the experimental results, where ParaTaintGX# denotes the variant of ParaTaintGX that keeps all other components unchanged but disables the Multi-node Heuristic Priority Search Algorithm. As shown in Table 2, ParaTaintGX# is still able to detect 10 vulnerabilities and outperforms all baseline methods. This result validates the effectiveness of our fine-grained modeling of parameter-level taint states.
We also measured the code coverage achieved by ParaTaintGX when the Multi-node Heuristic Priority Search Algorithm was disabled. The average coverage was 53.94%, which increases by 5.51 percentage points after enabling the algorithm.
As described in Section 4.2.2, with the Multi-node Heuristic Priority Search Algorithm enabled, ParaTaintGX detected a total of 12 vulnerabilities. This improvement stems from the algorithm’s ability to skip nodes that have already been visited or exhibit no taint-propagation capacity, while prioritizing the exploration of nodes more likely to reach dangerous functions. Therefore, we conclude that the Multi-node Heuristic Priority Search Algorithm effectively enhances the overall performance of ParaTaintGX.

5.9. Scalability and Limitations Discussion

Although the current evaluation is conducted on 12 publicly disclosed CVE vulnerabilities and 10 open-source SGX applications, the design of ParaTaintGX aims to support scalable analysis on larger SGX software ecosystems.
From the perspective of scalability, ParaTaintGX performs vulnerability detection through a call-chain exploration framework guided by parameter-level taint states. The multi-node heuristic priority search algorithm prioritizes nodes that are more likely to reach sink functions, thereby avoiding exhaustive traversal of low-value paths. This design significantly reduces the search space during analysis and enables the framework to scale to larger code bases with complex calling structures.
In addition, the pruning strategy applied during backtracking further reduces redundant path exploration. This helps maintain analysis efficiency as the program size increases.
Regarding generalization, ParaTaintGX focuses on common memory corruption patterns in SGX enclave programs. Since these vulnerability patterns widely exist in SGX applications that interact with untrusted environments through ECALL and OCALL interfaces, the proposed analysis approach can be applied to a broad range of SGX-based systems.
Nevertheless, several limitations remain in large-scale real-world deployments.
First, the precision of static taint analysis depends on the accuracy of pointer analysis. For programs with highly complex pointer operations or indirect memory accesses, the analysis may still produce false positives.
Second, some application-specific boundary checks implemented through customized logic may not be fully recognized by the current modeling approach, ultimately leading to false positives.
Despite these limitations, the experimental results on representative SGX applications and real CVEs demonstrate that ParaTaintGX provides a practical and effective solution for detecting memory corruption vulnerabilities in SGX enclave programs.

6. Conclusions and Future Work

Memory corruption vulnerabilities pose a critical threat to SGX applications, as they enable attackers to hijack control flow within an enclave, modify its data variables and pointers, and ultimately lead to data leakage or tampering. However, detecting such vulnerabilities remains challenging for state-of-the-art analysis methods. This is primarily due to insufficient definition of SGX-specific vulnerability patterns and the limited precision in function call chain construction.
To address these challenges, we propose a novel approach, ParaTaintGX. Our tool specifies prevalent memory corruption vulnerability types in SGX and, during static analysis, constructs call chains based on the combination of function identifiers and parameter taint states. This approach mitigates false negatives caused by aggressive pruning during chain construction and reduces false positives introduced during backtracking. Furthermore, we introduce a multi-node heuristic priority search algorithm to significantly enhance the efficiency of call chain construction. Finally, a dedicated pruning strategy is employed during backtracking to further improve analysis performance. In our evaluation, ParaTaintGX identified 12 vulnerabilities across 10 open-source projects, whereas existing tools detected only a small subset of these. Overall, ParaTaintGX demonstrates superior effectiveness in detecting memory corruption vulnerabilities compared to current solutions.
Despite the effectiveness of static analysis guided by SGX vulnerability patterns, vulnerability reports still require manual validation. Such validation demands substantial domain expertise to reason about input sources, execution contexts, and feasible triggering conditions, which imposes a high auditing cost. In future work, we plan to integrate the static analysis results produced by ParaTaintGX with directed fuzzing techniques, enabling automated validation and exploitation of suspicious taint-propagation paths. This combination is expected to substantially reduce manual effort while improving the reliability and practicality of vulnerability verification.

Author Contributions

Conceptualization, Y.X., C.L. and Z.S.; methodology, Y.X.; software, Y.X.; validation, F.L., Y.L. and J.Z.; formal analysis, C.L. and Z.S.; investigation, C.L.; resources, Y.L.; data curation, Y.X.; writing—original draft preparation, Y.X.; writing—review and editing, C.L.; visualization, F.L.; supervision, Z.S.; project administration, C.L.; funding acquisition, J.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported in part by the National Key R&D Program of China (No. 2022YFB3104100), in part by the Guangdong Basic and Applied Basic Research Foundation (No. 2024A1515011492), in part by the Tertiary Education Scientific Research Project of Guangzhou Municipal Education Bureau (No. 2024312190), and in part by the Guangdong Provincial Key Research Project for Regular Universities in Priority Areas (No. 2025ZDZX3019).

Data Availability Statement

The data presented in this study are available upon request from the corresponding author due to the security-sensitive nature of the vulnerability reproduction artifacts, which include detailed vulnerability trigger conditions and complete exploit paths derived from real-world systems. Public disclosure of such information may pose potential security risks. Therefore, access is provided only upon reasonable request and in accordance with responsible disclosure practices.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Wright, C.S. Bitcoin: A peer-to-peer electronic cash system. SSRN Electron. J. 2008, 3440802, 10–2139. [Google Scholar] [CrossRef]
  2. Wood, G. Ethereum: A secure decentralised generalised transaction ledger. Ethereum Proj. Yellow Pap. 2014, 151, 1–32. [Google Scholar]
  3. Buterin, V.; Wood, G. Ethereum white paper. GitHub Repos. 2013, 1, 5–7. [Google Scholar]
  4. Worldwide Cloud IT Infrastructure Market Growth Expected to Accelerate to 21 in 2015, Driven by Public Cloud Datacenter Expansion, According to IDC. Available online: https://www.pressebox.com/pressrelease/idc-central-europe-gmbh/Worldwide-Cloud-IT-Infrastructure-Market-Growth-Expected-to-Accelerate-to-21-in-2015-Driven-by-Public-Cloud-Datacenter-Expansion-According-to-IDC/boxid/735771 (accessed on 11 February 2025).
  5. Google Drive: Free Cloud Storage for Personal Use. Available online: https://workspace.google.com/intl/en_ALL/products/drive/ (accessed on 11 February 2025).
  6. Dropbox. Available online: https://www.dropbox.com/ (accessed on 11 February 2025).
  7. WeTransfer. Available online: https://wetransfer.com/ (accessed on 11 February 2025).
  8. Fernandes, E.; Jung, J.; Prakash, A. Security analysis of emerging smart home applications. In Proceedings of the 2016 IEEE Symposium on Security and Privacy (SP); IEEE: New York, NY, USA, 2016; pp. 636–654. [Google Scholar]
  9. Jia, Y.J.; Chen, Q.A.; Wang, S.; Rahmati, A.; Fernandes, E.; Mao, Z.M.; Prakash, A.; Unviersity, S. ContexloT: Towards providing contextual integrity to appified IoT platforms. In Proceedings of the NDSS, San Diego, CA, USA, 26 February–1 March 2017; Internet Society: Reston, VA, USA, 2017; Volume 2, p. 2. [Google Scholar]
  10. Hu, H.; Ahn, G.J.; Jorgensen, J. Detecting and resolving privacy conflicts for collaborative data sharing in online social networks. In Proceedings of the 27th Annual Computer Security Applications Conference, Orlando, FL, USA, 5–9 December 2011; Association for Computing Machinery: New York, NY, USA, 2011; pp. 103–112. [Google Scholar]
  11. Zyskind, G.; Nathan, O.; Pentland, A. Decentralizing privacy: Using blockchain to protect personal data. In Proceedings of the 2015 IEEE Security and Privacy Workshops; IEEE: New York, NY, USA, 2015; pp. 180–184. [Google Scholar]
  12. Jayaram, K.; Safford, D.; Sharma, U.; Naik, V.; Pendarakis, D.; Tao, S. Trustworthy geographically fenced hybrid clouds. In Proceedings of the 15th International Middleware Conference, Bordeaux, France, 8–12 December 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 37–48. [Google Scholar]
  13. Yi, X.; Bertino, E.; Rao, F.Y.; Bouguettaya, A. Practical privacy-preserving user profile matching in social networks. In Proceedings of the 2016 IEEE 32nd International Conference on Data Engineering (ICDE); IEEE: New York, NY, USA, 2016; pp. 373–384. [Google Scholar]
  14. Yi, X.; Bertino, E.; Rao, F.Y.; Lam, K.Y.; Nepal, S.; Bouguettaya, A. Privacy-preserving user profile matching in social networks. IEEE Trans. Knowl. Data Eng. 2019, 32, 1572–1585. [Google Scholar] [CrossRef]
  15. Pearson, S.; Benameur, A. Privacy, security and trust issues arising from cloud computing. In Proceedings of the 2010 IEEE Second International Conference on Cloud Computing Technology and Science; IEEE: New York, NY, USA, 2010; pp. 693–702. [Google Scholar]
  16. Capital One Data Breach Involves 100 Million Credit Card Applications. Available online: https://www.cnet.com/news/privacy/capital-one-data-breach-involves-100-million-credit-card-applications/ (accessed on 11 February 2025).
  17. Breach at Cloud Solution Provider PCM Inc. Available online: https://krebsonsecurity.com/2019/06/breach-at-cloud-solution-provider-pcm-inc/ (accessed on 11 February 2025).
  18. How Does Your Organization Treat File Sharing Services Like Dropbox, Google Drive, etc.? Available online: https://www.reddit.com/r/sysadmin/comments/7vx0xr/how_does_your_organization_treat_file_sharing/ (accessed on 11 February 2025).
  19. Fei, S.; Yan, Z.; Ding, W.; Xie, H. Security vulnerabilities of SGX and countermeasures: A survey. ACM Comput. Surv. (CSUR) 2021, 54, 1–36. [Google Scholar] [CrossRef]
  20. Brenner, S.; Wulf, C.; Goltzsche, D.; Weichbrodt, N.; Lorenz, M.; Fetzer, C.; Pietzuch, P.; Kapitza, R. Securekeeper: Confidential zookeeper using intel sgx. In Proceedings of the 17th International Middleware Conference, Trento, Italy, 12–16 December 2016; Association for Computing Machinery: New York, NY, USA, 2016; pp. 1–13. [Google Scholar]
  21. Ayoade, G.; Karande, V.; Khan, L.; Hamlen, K. Decentralized IoT data management using blockchain and trusted execution environment. In Proceedings of the 2018 IEEE International Conference on Information Reuse and Integration (IRI); IEEE: New York, NY, USA, 2018; pp. 15–22. [Google Scholar]
  22. Wang, Y.; Liu, L.; Su, C.; Ma, J.; Wang, L.; Yang, Y.; Shen, Y.; Li, G.; Zhang, T.; Dong, X. CryptSQLite: Protecting data confidentiality of SQLite with intel SGX. In Proceedings of the 2017 International Conference on Networking and Network Applications (NaNA); IEEE: New York, NY, USA, 2017; pp. 303–308. [Google Scholar]
  23. Luo, J.; Yang, X.; Yi, X. SGX-based users matching with privacy protection. In Proceedings of the Australasian Computer Science Week Multiconference, Melbourne, VIC, Australia, 4–6 February 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 1–9. [Google Scholar]
  24. Luo, J.; Yang, X.; Yi, X.; Han, F.; Kelarev, A. Efficient Privacy-Preserving User Matching with Intel SGX. In Proceedings of the International Conference on Broadband Communications, Networks and Systems; Springer: Berlin/Heidelberg, Germany, 2021; pp. 92–111. [Google Scholar]
  25. Widanage, C.; Liu, W.; Li, J.; Chen, H.; Wang, X.; Tang, H.; Fox, J. HySec-Flow: Privacy-preserving genomic computing with SGX-based big-data analytics framework. In Proceedings of the 2021 IEEE 14th International Conference on Cloud Computing (CLOUD); IEEE: New York, NY, USA, 2021; pp. 733–743. [Google Scholar]
  26. Hunt, T.; Zhu, Z.; Xu, Y.; Peter, S.; Witchel, E. Ryoan: A distributed sandbox for untrusted computation on secret data. ACM Trans. Comput. Syst. (TOCS) 2018, 35, 1–32. [Google Scholar] [CrossRef]
  27. Priebe, C.; Vaswani, K.; Costa, M. EnclaveDB: A secure database using SGX. In Proceedings of the 2018 IEEE Symposium on Security and Privacy (SP); IEEE: New York, NY, USA, 2018; pp. 264–278. [Google Scholar]
  28. Zheng, W.; Dave, A.; Beekman, J.G.; Popa, R.A.; Gonzalez, J.E.; Stoica, I. Opaque: An oblivious and encrypted distributed analytics platform. In Proceedings of the 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI 17), Boston, MA, USA, 27–29 March 2017; USENIX Association: Berkeley, CA, USA, 2017; pp. 283–298. [Google Scholar]
  29. Tramèr, F.; Boneh, D. Slalom: Fast, Verifiable and Private Execution of Neural Networks in Trusted Hardware. arXiv 2018, arXiv:1806.03287. [Google Scholar]
  30. Hunt, T.; Song, C.; Shokri, R.; Shmatikov, V.; Witchel, E. Chiron: Privacy-preserving Machine Learning as a Service. arXiv 2018, arXiv:1803.05961. [Google Scholar] [CrossRef]
  31. Hyperledger Fabric. Available online: https://hyperledger-fabric.readthedocs.io/ (accessed on 11 February 2025).
  32. Cheng, R.; Zhang, F.; Kos, J.; He, W.; Hynes, N.; Johnson, N.; Juels, A.; Miller, A.; Song, D. Ekiden: A platform for confidentiality-preserving, trustworthy, and performant smart contracts. In Proceedings of the 2019 IEEE European Symposium on Security and Privacy (EuroS&P); IEEE: New York, NY, USA, 2019; pp. 185–200. [Google Scholar]
  33. Signal. Available online: https://signal.org/ (accessed on 11 February 2025).
  34. Kim, S.; Han, J.; Ha, J.; Kim, T.; Han, D. Enhancing security and privacy of Tor’s ecosystem by using trusted execution environments. In Proceedings of the 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI 17), Boston, MA, USA, 27–29 March 2017; IEEE: Piscatawy, NJ, USA, 2017; pp. 145–161. [Google Scholar]
  35. Chen, L.; Li, Z.; Ma, Z.; Li, Y.; Chen, B.; Zhang, C. EnclaveFuzz: Finding Vulnerabilities in SGX Applications. In Proceedings of the Network and Distributed System Security (NDSS) Symposium, San Diego, CA, USA, 26 February–1 March 2024. [Google Scholar]
  36. Shacham, H. The geometry of innocent flesh on the bone: Return-into-libc without function calls (on the x86). In Proceedings of the 14th ACM Conference on Computer and Communications Security, Alexandria, VA, USA, 2 November–31 October 2007; ACM: New York, NY, USA, 2007; pp. 552–561. [Google Scholar]
  37. Hu, H.; Shinde, S.; Adrian, S.; Chua, Z.L.; Saxena, P.; Liang, Z. Data-oriented programming: On the expressiveness of non-control data attacks. In Proceedings of the 2016 IEEE Symposium on Security and Privacy (SP); IEEE: New York, NY, USA, 2016; pp. 969–986. [Google Scholar]
  38. Lee, J.; Jang, J.; Jang, Y.; Kwak, N.; Choi, Y.; Choi, C.; Kim, T.; Peinado, M.; Kang, B.B. Hacking in darkness: Return-oriented programming against secure enclaves. In Proceedings of the 26th USENIX Security Symposium (USENIX Security 17), Vancouver, BC, Canada, 16–18 August 2017; USENIX Association: Berkeley, CA, USA, 2017; pp. 523–539. [Google Scholar]
  39. Cloosters, T.; Rodler, M.; Davi, L. TeeRex: Discovery and exploitation of memory corruption vulnerabilities in SGX enclaves. In Proceedings of the 29th USENIX Security Symposium (USENIX Security 20), Online, 12–14 August 2020; USENIX Association: Berkeley, CA, USA, 2020; pp. 841–858. [Google Scholar]
  40. Khandaker, M.R.; Cheng, Y.; Wang, Z.; Wei, T. COIN attacks: On insecurity of enclave untrusted interfaces in SGX. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems, Lausanne, Switzerland, 16–20 March 2020; IEEE: Piscataway, NJ, USA, 2019; pp. 971–985. [Google Scholar]
  41. Antonino, P.R.G.; Wołoszyn, W.A.; Roscoe, A.W. Guardian: Symbolic Validation of Orderliness in SGX Enclaves. In Proceedings of the 2021 on Cloud Computing Security Workshop; Association for Computing Machinery: New York, NY, USA, 2021. [Google Scholar]
  42. Wang, Y.; Zhang, Z.; He, N.; Zhong, Z.; Guo, S.; Bao, Q.; Li, D.; Guo, Y.; Chen, X. Symgx: Detecting cross-boundary pointer vulnerabilities of sgx applications via static symbolic execution. In Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, Copenhagen, Denmark, 26–30 November 2023; USENIX Association: Berkeley, CA, USA, 2020; pp. 2710–2724. [Google Scholar]
  43. Cui, J.; Peng, Q.; Yao, Y.; Ye, K.; Zhang, J. IntraFuzz: Coverage-Guided Intra-Enclave Fuzzing for Intel SGX Applications. In Proceedings of the 2025 62nd ACM/IEEE Design Automation Conference (DAC); IEEE: New York, NY, USA, 2025; pp. 1–7. [Google Scholar]
  44. Xing, B.C.; Shanahan, M.; Leslie-Hurd, R. Intel® software guard extensions (Intel® SGX) software support for dynamic memory allocation inside an enclave. In Proceedings of the Hardware and Architectural Support for Security and Privacy 2016; Association for Computing Machinery: New York, NY, USA, 2016; pp. 1–9. [Google Scholar]
  45. CVE-2021-22552. Available online: https://nvd.nist.gov/vuln/detail/CVE-2021-22552 (accessed on 11 February 2025).
  46. CVE-2020-8937. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8937 (accessed on 11 February 2025).
  47. CVE-2020-8939. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8939 (accessed on 11 February 2025).
  48. Biondo, A.; Conti, M.; Davi, L.; Frassetto, T.; Sadeghi, A.R. The Guard’s Dilemma: Efficient Code-Reuse Attacks Against Intel SGX. In Proceedings of the USENIX Security Symposium, Baltimore, MD, USA, 15–17 August 2018. [Google Scholar]
  49. Van Bulck, J.; Oswald, D.; Marin, E.; Aldoseri, A.; Garcia, F.D.; Piessens, F. A tale of two worlds: Assessing the vulnerability of enclave shielding runtimes. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, London, UK, 11–15 November 2019; ACM: New York, NY, USA, 2019; pp. 1741–1758. [Google Scholar]
  50. CVE-2020-8941. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8941 (accessed on 11 February 2025).
  51. CVE-2020-8942. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8942 (accessed on 11 February 2025).
  52. CVE-2020-8943. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8943 (accessed on 11 February 2025).
  53. CVE-2020-8905. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8905 (accessed on 11 February 2025).
  54. CVE-2020-8944. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8944 (accessed on 11 February 2025).
  55. CVE-2020-8935. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8935 (accessed on 11 February 2025).
  56. CVE-2021-36218. Available online: https://nvd.nist.gov/vuln/detail/CVE-2021-36218 (accessed on 11 February 2025).
  57. Baumann, A.; Peinado, M.; Hunt, G. Shielding applications from an untrusted cloud with haven. ACM Trans. Comput. Syst. (TOCS) 2015, 33, 1–26. [Google Scholar] [CrossRef]
  58. Costan, V.; Devadas, S. Intel SGX Explained. IACR Cryptol. EPrint Arch. 2016, 2016, 86. [Google Scholar]
  59. Xie, H.; Zheng, J.; Zhang, Z.; Wei, S.; Hu, C. TEDA: A trusted execution environment-and-blockchain-based data protection architecture for Internet of Things. Computing 2024, 106, 939–960. [Google Scholar] [CrossRef]
  60. Bagher, K.; Lai, S. Sgx-stream: A secure stream analytics framework in sgx-enabled edge cloud. J. Inf. Secur. Appl. 2023, 72, 103403. [Google Scholar] [CrossRef]
  61. Wang, W.; Song, L.; Mei, B.; Liu, S.; Zhao, S.; Yan, S.; Wang, X.; Meng, D.; Hou, R. NestedSGX: Bootstrapping Trust to Enclaves within Confidential VMs. arXiv 2024, arXiv:2402.11438. [Google Scholar] [CrossRef]
  62. Jang, Y.; Keem, S. SGX-USB: Secure USB I/O Path for Secure Enclaves. In Proceedings of the Hawaii International Conference on System Sciences, Honolulu, HI, USA, 3–6 January 2024. [Google Scholar]
  63. Cui, J.; Yu, J.Z.; Shinde, S.; Saxena, P.; Cai, Z. Smashex: Smashing sgx enclaves using exceptions. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, Virtual, 15–19 November 2021; USENIX Association: Berkeley, CA, USA, 2021; pp. 779–793. [Google Scholar]
  64. Bajaj, S.; Sion, R. TrustedDB: A trusted hardware based database with privacy and data confidentiality. In Proceedings of the 2011 ACM SIGMOD International Conference on Management of Data, Athens, Greece, 12–16 June 2011; ACM: New York, NY, USA, 2011; pp. 205–216. [Google Scholar]
  65. Lutsch, A.; El-Hindi, M.; Heinrich, M.; Ritter, D.; IstvĂĄn, Z.; Binnig, C. Benchmarking analytical query processing in intel SGXv2. arXiv 2024, arXiv:2403.11874. [Google Scholar] [CrossRef]
  66. Tanigassalame, S.; Pipereau, Y.; Chader, A.; Toljaga, J.; Thomas, G. FastSGX: A Message-passing based Runtime for SGX. In Proceedings of the International Conference on Advanced Information Networking and Applications; Springer: Berlin/Heidelberg, Germany, 2024; pp. 74–85. [Google Scholar]
  67. Antonino, P.; Derek, A.; Wołoszyn, W.A. Flexible remote attestation of pre-SNP SEV VMs using SGX enclaves. IEEE Access 2023, 11, 90839–90856. [Google Scholar] [CrossRef]
  68. Zhao, W.; Lu, K.; Qi, Y.; Qi, S. Mptee: Bringing flexible and efficient memory protection to intel sgx. In Proceedings of the Fifteenth European Conference on Computer Systems, Heraklion, Greece, 27–30 April 2020; ACM: New York, NY, USA, 2020; pp. 1–15. [Google Scholar]
  69. Alder, F.; Van Bulck, J.; Spielman, J.; Oswald, D.; Piessens, F. Faulty point unit: ABI poisoning attacks on trusted execution environments. Digit. Threat. Res. Pract. (DTRAP) 2022, 3, 1–26. [Google Scholar] [CrossRef]
  70. Bao, Q.; Wang, Z.; Li, X.; Larus, J.R.; Wu, D. Abacus: Precise side-channel analysis. In Proceedings of the 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE); IEEE: New York, NY, USA, 2021; pp. 797–809. [Google Scholar]
  71. Brasser, F.; Müller, U.; Dmitrienko, A.; Kostiainen, K.; Capkun, S.; Sadeghi, A.R. Software grand exposure:{SGX} cache attacks are practical. In Proceedings of the 11th USENIX Workshop on Offensive Technologies (WOOT 17), Vancouver, BC, Canada, 14–15 August 2017. [Google Scholar]
  72. Carré, S.; Facon, A.; Guilley, S.; Takarabt, S.; Schaub, A.; Souissi, Y. Cache-timing attack detection and prevention: Application to crypto libs and pqc. In Proceedings of the International Workshop on Constructive Side-Channel Analysis and Secure Design; Springer: Berlin/Heidelberg, Germany, 2019; pp. 13–21. [Google Scholar]
  73. Chen, G.; Chen, S.; Xiao, Y.; Zhang, Y.; Lin, Z.; Lai, T.H. Sgxpectre: Stealing intel secrets from sgx enclaves via speculative execution. In Proceedings of the 2019 IEEE European Symposium on Security and Privacy (EuroS&P); IEEE: New York, NY, USA, 2019; pp. 142–157. [Google Scholar]
  74. He, W.; Zhang, W.; Das, S.; Liu, Y. Sgxlinger: A new side-channel attack vector based on interrupt latency against enclave execution. In Proceedings of the 2018 IEEE 36th International Conference on Computer Design (ICCD); IEEE: New York, NY, USA, 2018; pp. 108–114. [Google Scholar]
  75. Kim, D.; Jang, D.; Park, M.; Jeong, Y.; Kim, J.; Choi, S.; Kang, B.B. SGX-LEGO: Fine-grained SGX controlled-channel attack and its countermeasure. Comput. Secur. 2019, 82, 118–139. [Google Scholar] [CrossRef]
  76. Lang, F.; Wang, W.; Meng, L.; Lin, J.; Wang, Q.; Lu, L. Mole: Mitigation of side-channel attacks against sgx via dynamic data location escape. In Proceedings of the 38th Annual Computer Security Applications Conference, Austin, TX, USA, 5–9 December 2022; ACM: New York, NY, USA, 2017; pp. 978–988. [Google Scholar]
  77. Murdock, K.; Oswald, D.; Garcia, F.D.; Van Bulck, J.; Gruss, D.; Piessens, F. Plundervolt: Software-based fault injection attacks against Intel SGX. In Proceedings of the 2020 IEEE Symposium on Security and Privacy (SP); IEEE: New York, NY, USA, 2020; pp. 1466–1482. [Google Scholar]
  78. Van Bulck, J.; Piessens, F.; Strackx, R. SGX-Step: A practical attack framework for precise enclave execution control. In Proceedings of the 2nd Workshop on System Software for Trusted Execution, Shanghai, China, 28 October 2017; USENIX Association: Berkeley, CA, USA, 2017; pp. 1–6. [Google Scholar]
  79. Weichbrodt, N.; Kurmus, A.; Pietzuch, P.; Kapitza, R. AsyncShock: Exploiting synchronisation bugs in Intel SGX enclaves. In Proceedings of the European Symposium on Research in Computer Security; Springer: Berlin/Heidelberg, Germany, 2016; pp. 440–457. [Google Scholar]
  80. Zhao, S.; Li, M.; Zhangyz, Y.; Lin, Z. vsgx: Virtualizing sgx enclaves on amd sev. In Proceedings of the 2022 IEEE Symposium on Security and Privacy (SP); IEEE: New York, NY, USA, 2022; pp. 321–336. [Google Scholar]
  81. Cloosters, T.; Willbold, J.; Holz, T.; Davi, L. {SGXFuzz}: Efficiently synthesizing nested structures for {SGX} enclave fuzzing. In Proceedings of the 31st USENIX Security Symposium (USENIX Security 22), Boston, MA, USA, 10–12 August 2022; USENIX Association: Berkeley, CA, USA, 2022; pp. 3147–3164. [Google Scholar]
  82. Khan, A.; Zou, M.; Kim, K.; Xu, D.; Bianchi, A.; Tian, D.J. Fuzzing sgx enclaves via host program mutations. In Proceedings of the 2023 IEEE 8th European Symposium on Security and Privacy (EuroS&P); IEEE: New York, NY, USA, 2023; pp. 472–488. [Google Scholar]
  83. GitHub. Change Is Constant. GitHub Keeps You Ahead. Available online: https://github.com/ (accessed on 11 February 2025).
  84. Asylo. Available online: https://asylo.dev (accessed on 11 February 2025).
  85. Karande, V.; Bauman, E.; Lin, Z.; Khan, L. Sgx-log: Securing system logs with sgx. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security, Abu Dhabi, United Arab Emirates, 2–6 April 2017; ACM: New York, NY, USA, 2018; pp. 19–30. [Google Scholar]
  86. TaLoS: Efficient TLS Termination Inside SGX Enclaves for Existing Applications. Available online: https://github.com/lsds/TaLoS (accessed on 11 February 2025).
  87. sgx-reencrypt. Available online: https://github.com/kudelskisecurity/sgx-reencrypt (accessed on 11 February 2025).
  88. sgxwallet. Available online: https://github.com/skalenetwork/sgxwallet (accessed on 11 February 2025).
  89. SGXCryptoFile. Available online: https://github.com/rscosta/SGXCryptoFile (accessed on 11 February 2025).
  90. Bauman, E.; Lin, Z. A case for protecting computer games with SGX. In Proceedings of the 1st Workshop on System Software for Trusted Execution, Trento, Italy, 12–16 December 2016; USENIX Association: Berkeley, CA, USA, 2016; pp. 1–6. [Google Scholar]
  91. Kim, T.; Park, J.; Woo, J.; Jeon, S.; Huh, J. Shieldstore: Shielded in-memory key-value storage with sgx. In Proceedings of the Fourteenth EuroSys Conference 2019, Dresden, Germany, 25–28 March 2019; ACM: New York, NY, USA, 2015; pp. 1–15. [Google Scholar]
  92. verifiable-election. Available online: https://github.com/davidgmorais/verifiable-election (accessed on 11 February 2025).
  93. opaque. Available online: https://github.com/brucechin/opaque (accessed on 11 February 2025).
  94. CVE-2020-8936. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8936 (accessed on 11 February 2025).
  95. CVE-2020-8940. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8940 (accessed on 11 February 2025).
  96. CVE-2020-8938. Available online: https://nvd.nist.gov/vuln/detail/CVE-2020-8938 (accessed on 11 February 2025).
Figure 1. Execution Process of SGX.
Figure 1. Execution Process of SGX.
Mathematics 14 01007 g001
Figure 2. Limitation of Function-Level Pruning.
Figure 2. Limitation of Function-Level Pruning.
Mathematics 14 01007 g002
Figure 3. Call chain traceback.
Figure 3. Call chain traceback.
Mathematics 14 01007 g003
Figure 4. Taint Analysis Architecture for SGX Vulnerability Patterns.
Figure 4. Taint Analysis Architecture for SGX Vulnerability Patterns.
Mathematics 14 01007 g004
Figure 5. Call Chain Pruning.
Figure 5. Call Chain Pruning.
Mathematics 14 01007 g005
Figure 6. TaintBitmap for Parameter Tracking.
Figure 6. TaintBitmap for Parameter Tracking.
Mathematics 14 01007 g006
Figure 7. Function-Based Call Chain Construction Results.
Figure 7. Function-Based Call Chain Construction Results.
Mathematics 14 01007 g007
Figure 8. Function and Parameter Taint State-Based Call Chain Construction Results.
Figure 8. Function and Parameter Taint State-Based Call Chain Construction Results.
Mathematics 14 01007 g008
Figure 9. Comparative Analysis of Key Performance Indicators.
Figure 9. Comparative Analysis of Key Performance Indicators.
Mathematics 14 01007 g009
Figure 10. Comparison of False Negative Rates for Out-of-Bounds Read and Out-of-Bounds Write Vulnerabilities.
Figure 10. Comparison of False Negative Rates for Out-of-Bounds Read and Out-of-Bounds Write Vulnerabilities.
Mathematics 14 01007 g010
Figure 11. Comparison of Precision.
Figure 11. Comparison of Precision.
Mathematics 14 01007 g011
Figure 12. The complete coverage result of ParaTaintGX on the entire benchmarks.
Figure 12. The complete coverage result of ParaTaintGX on the entire benchmarks.
Mathematics 14 01007 g012
Table 1. Details of Open-Source GitHub Applications.
Table 1. Details of Open-Source GitHub Applications.
ProjectVersion#.ECall#.OCall
sgx-log [85]7b5530e46
TaLoS [86]640569520758
Asylo [84]fa6485c513
Sgx-reencrypt [87]6f0659144
sgxwallet [88]da89bfe183
SGXCryptoFile [89]92f3cd63812
Sgx-biniax2 [90]35aaa1e34
opaque [93]68223fe165
ShieldStore [91]5de012233
Verifiable-election [92]5f0f9f172
Table 2. Core Performance Metrics.
Table 2. Core Performance Metrics.
ToolTPFPFNRecallPrecisionF1-ScoreADT
TeeRex51089741.7%0.46%0.00931.17 ± 6.14 min
SymGX612650.0%33.3%0.39912.90 ± 3.66 min
IntraFuzz729558.3%19.4%0.29126.24 ± 8.13 min
ParaTaintGX98375.0%52.9%0.62011.12 ± 3.26 min
Table 3. Vulnerability detection results on real SGX applications.
Table 3. Vulnerability detection results on real SGX applications.
ProjectTeeRex [39]SymGX [42]IntraFuzz [43]ParaTaintGX#ParaTaintGX
Alerts Vul Alerts Vul Alerts Vul Alerts Vul Alerts Vul
Asylo [84]8214126236177118
Sgx-log [85]282011016010070
TaLoS [86]4011181121151101
Sgxreencrypt [87]92000500000
Sgxwallet [88]27316013111061
SGXCryptoFile [89]7440508112040
Sgx-biniax2 [90]69129012011070
Opaque [93]529010011013080
ShieldStore [91]321141906131
Verifiable-election [92]41007115112161
Total4564982912410107106212
# ParaTaintGX# denotes the variant with the Multi-node Heuristic Priority Search Algorithm disabled.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, C.; Xu, Y.; Sun, Z.; Liu, Y.; Zhang, J.; Li, F. ParaTaintGX: Detecting Memory Corruption Vulnerabilities in SGX Applications via Parameter-Taint Model. Mathematics 2026, 14, 1007. https://doi.org/10.3390/math14061007

AMA Style

Li C, Xu Y, Sun Z, Liu Y, Zhang J, Li F. ParaTaintGX: Detecting Memory Corruption Vulnerabilities in SGX Applications via Parameter-Taint Model. Mathematics. 2026; 14(6):1007. https://doi.org/10.3390/math14061007

Chicago/Turabian Style

Li, Chao, Yifan Xu, Zhe Sun, Yongjie Liu, Jun Zhang, and Fan Li. 2026. "ParaTaintGX: Detecting Memory Corruption Vulnerabilities in SGX Applications via Parameter-Taint Model" Mathematics 14, no. 6: 1007. https://doi.org/10.3390/math14061007

APA Style

Li, C., Xu, Y., Sun, Z., Liu, Y., Zhang, J., & Li, F. (2026). ParaTaintGX: Detecting Memory Corruption Vulnerabilities in SGX Applications via Parameter-Taint Model. Mathematics, 14(6), 1007. https://doi.org/10.3390/math14061007

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop