Deepdiff checks ai security patches for hidden bugs and regressions

DeepDiff: Neuro-Dynamic Regression-Freedom Checking for Security Patch Validation

Cryptography and SecuritySoftware Engineering

Summary

Fixing software vulnerabilities with AI-generated patches is hard because a patch might stop a crash but still cause other problems. The authors present DeepDiff, a tool that compares the behavior of a patched program to the original when given inputs that don't cause crashes, helping find if the patch inadvertently breaks intended functions. They created a dataset of good and bad patches and tested different ways to generate these safe test inputs. Their results show DeepDiff can help validate patches, though challenges remain.

What this means in practice

Authors

Laboni Sarker, Shuvendu K Lahiri

Abstract

Automatically validating AI-generated security patches remains a significant challenge. Eliminating a reported crash and passing existing test suites do not provide sufficient confidence that a patch correctly addresses the underlying vulnerability without introducing regressions. We present DeepDiff, a technique for regression-freedom checking that differentially evaluates candidate patches against the original vulnerable program using non-crashing inputs that exercise the affected code paths. The expectation of regression-freedom is that a correct patch should eliminate the vulnerability triggering crash while preserving the intended behavior on non-crashing inputs. To support this evaluation, we introduce a dataset of correct and incorrect patch candidates for open-source memory-safety vulnerabilities from CyberGym. We explore different approaches for non-triggering test input generation to reach the patched code, a purely neural regression-freedom checker, and a hybrid approach that combines dynamic analysis with neural techniques. Our experimental results demonstrate the effectiveness of regression-freedom checking in validating security patches while outlining the challenges that remain.