Predictive analysis for race detection in software-defined networks

Race condition remains one kind of the most common concurrency bugs in software-defined networks (SDNs). The race conditions can be exploited to lead to security and reliability risks. However, the race conditions are notoriously difficult to detect. The existing race detectors for SDNs have limited detection capability. They can only detect the races in the original traces (observed traces) and cause false negatives. In this study, we present a predictive analysis framework called SDN-predict for race detection in SDNs. By encoding the order between the specified network events in SDNs as constraint, we formulate race detection as a constraint solving problem. In addition to detecting the races in the original trace, our framework can also detect the races in the feasible traces got from reordering the events in the original trace while satisfying the consistency requirements of trace. Moreover, we formally prove that our predictive analysis framework is sound and can achieve the maximal possible detection capability for any sound dynamic race detector with respect to the same trace. We evaluate our framework on a set of traces collected from three SDN controllers (POX, Floodlight, ONOS), running 5 representative applications including reactive and proactive applications in large networks, on three different network topologies. These experiments show that our framework has higher race detection capability than exisiting SDN race detector-SDNRacer, and detects more 1173 races. These 1173 races were previously undetected and confirmed by checking the race graphs.

[1]  Jingling Xue,et al.  Acculock: Accurate and efficient detection of data races , 2011, International Symposium on Code Generation and Optimization (CGO 2011).

[2]  Laurent Vanbever,et al.  SDNRacer: concurrency analysis for software-defined networks , 2016, PLDI.

[3]  Jong-Deok Choi,et al.  Hybrid dynamic data race detection , 2003, PPoPP '03.

[4]  Stephen N. Freund,et al.  FastTrack: efficient and precise dynamic race detection , 2009, PLDI '09.

[5]  Jeff Huang,et al.  Scaling predictive analysis of concurrent programs by removing trace redundancy , 2013, TSEM.

[6]  Koushik Sen,et al.  Race directed random testing of concurrent programs , 2008, PLDI '08.

[7]  Konstantin Serebryany,et al.  ThreadSanitizer: data race detection in practice , 2009, WBIA '09.

[8]  Lei Xu,et al.  Attacking the Brain: Races in the SDN Control Plane , 2017, USENIX Security Symposium.

[9]  Kai Lu,et al.  Surveying concurrency bug detectors based on types of detected bugs , 2016, Science China Information Sciences.

[10]  Xiangyu Zhang,et al.  IPA: improving predictive analysis with pointer analysis , 2016, ISSTA.

[11]  T. S. Eugene Ng,et al.  Controlling Race Conditions in OpenFlow to Accelerate Application Verification and Packet Forwarding , 2015, IEEE Transactions on Network and Service Management.

[12]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[13]  Assaf Schuster,et al.  Efficient on-the-fly data race detection in multithreaded C++ programs , 2003, PPoPP '03.

[14]  Laurent Vanbever,et al.  BigBug: Practical Concurrency Analysis for SDN , 2017, SOSR.

[15]  Yan Cai,et al.  Effective and precise dynamic detection of hidden races for Java programs , 2015, ESEC/SIGSOFT FSE.

[16]  Mahesh Viswanathan,et al.  Dynamic race prediction in linear time , 2017, PLDI.

[17]  Grigore Rosu,et al.  Maximal sound predictive race detection with control flow abstraction , 2014, PLDI.

[18]  Jingling Xue,et al.  Acculock: Accurate and efficient detection of data races , 2011, CGO 2011.

[19]  Raja Das,et al.  Effective Static Analysis to Find Concurrency Bugs in Java , 2010, 2010 10th IEEE Working Conference on Source Code Analysis and Manipulation.

[20]  Alexander Aiken,et al.  Effective static race detection for Java , 2006, PLDI '06.

[21]  Baowen Xu,et al.  An empirical study on constraint optimization techniques for test generation , 2015, Science China Information Sciences.

[22]  Chao Wang,et al.  Symbolic predictive analysis for concurrent programs , 2009, Formal Aspects of Computing.

[23]  Rupak Majumdar,et al.  Kuai: A model checker for software-defined networks , 2014, 2014 Formal Methods in Computer-Aided Design (FMCAD).

[24]  Shan Lu,et al.  Fixing, preventing, and recovering from concurrency bugs , 2015, Science China Information Sciences.

[25]  Yannis Smaragdakis,et al.  Sound predictive race detection in polynomial time , 2012, POPL '12.

[26]  Brighten Godfrey,et al.  VeriFlow: verifying network-wide invariants in real time , 2012, HotSDN '12.