VulShield: Protecting Vulnerable Code Before Deploying Patches

Yuan Li, Chao Zhang, Jinhao Zhu, Penghui Li, Chenyang Li, Songtao Yang, Wende Tan

Presented at NDSS 2025, VulShield is an automated framework designed to bridge the critical security gap known as the "attack window." This period, which averages 30 days or more, exists between the discovery of a software vulnerability and the deployment of an official vendor patch. During this time, systems remain exposed to exploitation. VulShield provides a non-invasive, automated way to generate and enforce temporary security "shields" to protect both kernel and user-space programs.

The Challenge of Temporary Patching

Existing solutions for temporary vulnerability mitigation often suffer from significant limitations. Many are restricted to specific bug types, such as buffer overflows, or require invasive modifications like recompiling the target software. Furthermore, modern tools frequently rely on features like eBPF or Linux Security Modules (LSM), which are often unavailable on the legacy systems that require protection most urgently. VulShield addresses these issues by offering a pluggable, backward-compatible solution that requires no source code modification.

System Architecture

VulShield operates through a decoupled architecture consisting of a developer-side policy generator and a target-side enforcement module.

The overall architecture of VulShield, illustrating the workflow from developer-side policy generation to network delivery and target-device enforcement.

1. Automated Policy Generation

The system utilizes sanitizer reports (e.g., from ASan or UBSan) and the program's source code to identify the logic required to prevent a bug.

  • Static Analysis: Identifies "perception points" for data gathering and "decision points" where the vulnerability is triggered.
  • Constraint Mapping: Translates vulnerability logic into formal security policies (e.g., bounds checking).
  • Policy Lowering: Uses DWARF debug information to map source-level constraints to specific binary addresses and CPU registers, ensuring the policy is applicable to the compiled binary.

2. Non-Invasive Enforcement

The enforcement mechanism is implemented as a standalone Linux kernel module. It uses standard Kprobes (for the kernel) and Uprobes (for user-space) to hook into execution flows without altering the original binary files.

The VulShield Policy Enforcer pipeline, showing the three-stage process of Perception, Decision, and Execution within the kernel space.

The enforcer follows a three-stage pipeline:

  1. Perception: Collects runtime data from registers and memory.
  2. Decision: Evaluates the runtime data against the logical constraints defined in the security policy.
  3. Execution: If a violation is detected, it triggers mitigation actions such as returning error codes, terminating the process, or employing advanced techniques like "Quarantine and Sweeper" for Use-After-Free vulnerabilities.

Evaluation and Key Results

The authors evaluated VulShield against several benchmarks, including the Magma ground-truth bug dataset and 32 real-world CVEs across 9 different CWE types (e.g., Race Conditions, Buffer Overflows, and Use-After-Free).

  • Effectiveness: VulShield successfully mitigated all 32 tested CVEs.
  • Performance: In Nginx stress tests, the system introduced less than 0.001 ms of latency per request. Overall system overhead measured by UnixBench was remarkably low at 1.047%.
  • Efficiency: Security policies for complex vulnerabilities could be generated automatically in under 10 minutes.
  • Applicability: Analysis of the SecretPatch dataset (1,458 historical patches) suggests that VulShield's approach could potentially mitigate 56.6% of all open-source software vulnerabilities.

Conclusion and Future Work

VulShield demonstrates that the logic used by sanitizers to detect bugs during development can be effectively repurposed to prevent them in production. By remaining compatible with older kernels and requiring no source code changes, it provides a practical solution for high-availability environments. Future research aims to improve automation for reports lacking precise location data and to deepen data-flow analysis to cover more complex execution paths.

Summary updated

BibTeX
@inproceedings{li2025vulshield,
  author = {Yuan Li and Chao Zhang and Jinhao Zhu and Penghui Li and Chenyang Li and Songtao Yang and Wende Tan},
  title = {{VulShield: Protecting Vulnerable Code Before Deploying Patches}},
  booktitle = {NDSS},
  year = {2025},
}
Figure