Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3274694.3274718acmotherconferencesArticle/Chapter ViewAbstractPublication PagesacsacConference Proceedingsconference-collections
research-article

A Heuristic Framework to Detect Concurrency Vulnerabilities

Published: 03 December 2018 Publication History

Abstract

With a growing demand of concurrent software to exploit multi-core hardware capability, concurrency vulnerabilities have become an inevitable threat to the security of today's IT industry. Existing concurrent program detection schemes focus mainly on detecting concurrency errors such as data races, atomicity violation, etc., with little attention paid to detect concurrency vulnerabilities that may be exploited to infringe security. In this paper, we propose a heuristic framework that combines both static analysis and fuzz testing to detect targeted concurrency vulnerabilities such as concurrency buffer overflow, double free, and use-after-free. The static analysis locates sensitive concurrent operations in a concurrent program, categorizes each finding into a potential type of concurrency vulnerability, and determines the execution order of the sensitive operations in each finding that would trigger the suspected concurrency vulnerability. The results are then plugged into the fuzzer with the execution order fixed by the static analysis in order to trigger the suspected concurrency vulnerabilities.
In order to introduce more variance which increases possibility that the concurrency errors can be triggered, we also propose manipulation of thread scheduling priority to enable a fuzzer such as AFL to effectively explore thread interleavings in testing a concurrent program. To the best of our knowledge, this is the first fuzzer that is capable of effectively exploring concurrency errors.
In evaluating the proposed heuristic framework with a benchmark suit of six real-world concurrent C programs, the framework detected two concurrency vulnerabilities for the proposed concurrency vulnerability detection, both being confirmed to be true positives, and produced three new crashes for the proposed interleaving exploring fuzzer that existing fuzzers could not produce. These results demonstrate the power and effectiveness of the proposed heuristic framework in detecting concurrency errors and vulnerabilities.

References

[1]
D. A. Bader, V. Kanade, and K. Madduri. 2007. SWARM: A Parallel Programming Framework for Multicore Processors. 1--8 pages.
[2]
Marcel Böhme, Van-Thuan Pham, Manh-Dung Nguyen, and Abhik Roychoudhury. 2017. Directed Greybox Fuzzing. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (CCS '17). ACM, New York, NY, USA, 2329--2344.
[3]
Sebastian Burckhardt, Pravesh Kothari, Madanlal Musuvathi, and Santosh Nagarakatte. 2010. A Randomized Scheduler with Probabilistic Guarantees of Finding Bugs. In Proceedings of the Fifteenth Edition of ASPLOS on Architectural Support for Programming Languages and Operating Systems (ASPLOS XV). ACM, New York, NY, USA, 167--178.
[4]
Jacob Burnim, Koushik Sen, and Christos Stergiou. 2011. Testing Concurrent Programs on Relaxed Memory Models. In Proceedings of the 2011 International Symposium on Software Testing and Analysis (ISSTA '11). ACM, New York, NY, USA, 122--132.
[5]
Cristian Cadar and Koushik Sen. 2013. Symbolic Execution for Software Testing: Three Decades Later. Commun. ACM 56, 2 (Feb. 2013), 82--90.
[6]
Peng Chen and Hao Chen. 2018. Angora: Efficient Fuzzing by Principled Search. CoRR abs/1803.01307 (2018). arXiv:1803.01307 http://arxiv.org/abs/1803.01307
[7]
Ankit Choudhary, Shan Lu, and Michael Pradel. 2017. Efficient Detection of Thread Safety Violations via Coverage-guided Generation of Concurrent Tests. In Proceedings of the 39th International Conference on Software Engineering (ICSE '17). IEEE Press, Piscataway, NJ, USA, 266--277.
[8]
Tayfun Elmas, Jacob Burnim, George Necula, and Koushik Sen. 2013. CONCUR-RIT: a domain specific language for reproducing concurrency bugs. Acm Sigplan Notices 48, 6 (2013), 153--164.
[9]
Azadeh Farzan, P. Madhusudan, Niloofar Razavi, and Francesco Sorrentino. 2012. Predicting null-pointer dereferences in concurrent programs. In Proceedings of ACM Sigsoft International Symposium on the Foundations of Software Engineering. 1--11.
[10]
Patrice Godefroid, Michael Y. Levin, and David Molnar. 2008. Automated Whitebox Fuzz Testing. In Proceedings of the 16th Network and Distributed System Security Symposium, Vol. 8. 151--166.
[11]
Pallavi Joshi, Mayur Naik, Chang Seo Park, and Koushik Sen. 2009. CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs. In Proceedings of Computer Aided Verification. Berlin, Heidelberg, 675--681.
[12]
Marek Kroemeke. 2014. Apache 2.4.7 mod_status - Scoreboard Handling Race Condition. https://www.exploit-db.com/exploits/34133/.
[13]
Lcamtuf. 2018. American Fuzzy Lop. http://lcamtuf.coredump.cx/afl/.
[14]
Yuekang Li, Bihuan Chen, Mahinthan Chandramohan, Shang-Wei Lin, Yang Liu, and Alwen Tiu. 2017. Steelix: Program-state Based Binary Fuzzing. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2017). ACM, New York, NY, USA, 627--637.
[15]
Barton P. Miller, Louis Fredriksen, and Bryan So. 1990. An Empirical Study of the Reliability of UNIX Utilities. Commun. ACM 32, 12 (1990), 32--44.
[16]
NIST. 2018. National Vulnerability Database. https://nvd.nist.gov/.
[17]
NVD. 2018. CVE-2010--5298 Detail. https://nvd.nist.gov/vuln/detail/CVE-2010-5298.
[18]
OpenBSD. 2014. OpenBSD 5.4 errata 8. https://ftp.openbsd.org/pub/OpenBSD/ patches/5.4/common/008_openssl.patch.
[19]
Soyeon Park, Shan Lu, and Yuanyuan Zhou. 2009. CTrigger: Exposing Atomicity Violation Bugs from Their Hiding Places. In Proceedings of the 14th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XIV). ACM, New York, NY, USA, 25--36.
[20]
Sangmin Park, Richard Vuduc, and Mary Jean Harrold. 2015. UNICORN: a unified approach for localizing non-deadlock concurrency bugs. Software Testing, Verification and Reliability 25, 3 (2015), 167--190. arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/stvr.1523
[21]
Sangmin Park, Richard W. Vuduc, and Mary Jean Harrold. 2010. Falcon: Fault Localization in Concurrent Programs. In Proceedings of the 32Nd ACM/IEEE International Conference on Software Engineering - Volume 1 (ICSE '10). ACM, New York, NY, USA, 245--254.
[22]
Harish Patil, Cristiano Pereira, Mack Stallcup, Gregory Lueck, and James Cownie. 2010. PinPlay: A Framework for Deterministic Replay and Reproducible Analysis of Parallel Programs. In Proceedings of the 8th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO '10). ACM, New York, NY, USA, 2--11.
[23]
Polyvios Pratikakis, Jeffrey S. Foster, and Michael Hicks. 2006. LOCKSMITH: Context-sensitive correlation analysis for race detection. Acm Sigplan Notices 41, 6 (2006), 320--331.
[24]
Nishant Sinha and Chao Wang. 2010. Staged Concurrent Program Analysis. In Proceedings of the Eighteenth ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE '10). ACM, New York, NY, USA, 47--56.
[25]
Sherri Sparks, Shawn Embleton, Ryan K Cunningham, and Cliff Changchun Zou. 2007. Automated Vulnerability Analysis: Leveraging Control Flow for Evolutionary Input Crafting. In Twenty-Third Annual Computer Security Applications Conference (ACSAC 2007). 477--486.
[26]
Sebastian Steenbuck and Gordon Fraser. 2013. Generating unit tests for concurrent classes. In IEEE Sixth International Conference on Software Testing, Verification and Validation (ICST). IEEE, 144--153.
[27]
Valerio Terragni and Shing-Chi Cheung. 2016. Coverage-driven Test Code Generation for Concurrent Classes. In Proceedings of the 38th International Conference on Software Engineering (ICSE '16). ACM, New York, NY, USA, 1121--1132.
[28]
Jan Wen Voung, Ranjit Jhala, and Sorin Lerner. 2007. RELAY: Static Race Detection on Millions of Lines of Code. In Proceedings of the the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering (ESEC-FSE '07). ACM, New York, NY, USA, 205--214.
[29]
Pengfei Wang, Jens Krinke, Kai Lu, Gen Li, and Steve Dodier-Lazaro. 2017. How Double-fetch Situations Turn into Double-fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel. In Proceedings of the 26th USENIX Conference on Security Symposium (SEC'17). USENIX Association, Berkeley, CA, USA, 1--16. http://dl.acm.org/citation.cfm?id=3241189.3241191
[30]
Tielei Wang, Tao Wei, Guofei Gu, and Wei Zou. 2010. TaintScope: A Checksum-Aware Directed Fuzzing Tool for Automatic Software Vulnerability Detection. In Proceedings of the 2010 IEEE Symposium on Security and Privacy (SP '10). IEEE Computer Society, Washington, DC, USA, 497--512.
[31]
Wikipedia. 2018. Dirty COW. https://en.wikipedia.org/wiki/Dirty_COW.
[32]
Maverick Woo, Sang Kil Cha, Samantha Gottlieb, and David Brumley. 2013. Scheduling Black-box Mutational Fuzzing. In Proceedings of the 2013 ACM SIGSAC Conference on Computer and Communications Security (CCS '13). ACM, New York, NY, USA, 511--522.
[33]
Junfeng Yang, Ang Cui, Sal Stolfo, and Simha Sethumadhavan. 2012. Concurrency Attacks. In Proceedings of the 4th USENIX Conference on Hot Topics in Parallelism (HotPar '12). USENIX Association, Berkeley, CA, USA, 15--15. http://dl.acm.org/citation.cfm?id=2342788.2342803
[34]
Jie Yu, Satish Narayanasamy, Cristiano Pereira, and Gilles Pokam. 2012. Maple: A Coverage-driven Testing Tool for Multithreaded Programs. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA '12). ACM, New York, NY, USA, 485--502.
[35]
Wei Zhang, Junghee Lim, Ramya Olichandran, Joel Scherpelz, Guoliang Jin, Shan Lu, and Thomas Reps. 2011. ConSeq: Detecting Concurrency Bugs Through Sequential Errors. In Proceedings of the Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XVI). ACM, New York, NY, USA, 251--264.
[36]
Wei Zhang, Chong Sun, and Shan Lu. 2010. ConMem: Detecting Severe Concurrency Bugs Through an Effect-oriented Approach. In Proceedings of the Fifteenth Edition of ASPLOS on Architectural Support for Programming Languages and Operating Systems (ASPLOS XV). ACM, New York, NY, USA, 179--192.
[37]
Shixiong Zhao, Rui Gu, Haoran Qiu, Tsz On Li, Yuexuan Wang, Heming Cui, and Junfeng Yang. 2018. OWL: Understanding and Detecting Concurrency Attacks. In Proceedings of IEEE/IFIP International Conference on Dependable Systems and Networks. 219--230.

Cited By

View all
  • (2025)Selectively Uniform Concurrency TestingProceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3669940.3707214(1003-1019)Online publication date: 30-Mar-2025
  • (2025)Thread-sensitive fuzzing for concurrency bug detectionComputers & Security10.1016/j.cose.2024.104171148(104171)Online publication date: Jan-2025
  • (2024)Race Directed Fuzzing for More Effective Concurrency TestingProceedings of the 2024 The 6th World Symposium on Software Engineering (WSSE)10.1145/3698062.3698063(1-6)Online publication date: 13-Sep-2024
  • Show More Cited By

Index Terms

  1. A Heuristic Framework to Detect Concurrency Vulnerabilities

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    ACSAC '18: Proceedings of the 34th Annual Computer Security Applications Conference
    December 2018
    766 pages
    ISBN:9781450365697
    DOI:10.1145/3274694
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    In-Cooperation

    • ACSA: Applied Computing Security Assoc

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 03 December 2018

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Concurrency Vulnerabilities
    2. Fuzzing Test
    3. Thread Schedule

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Funding Sources

    • China National Key Basic Research Program

    Conference

    ACSAC '18

    Acceptance Rates

    Overall Acceptance Rate 104 of 497 submissions, 21%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)48
    • Downloads (Last 6 weeks)4
    Reflects downloads up to 03 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2025)Selectively Uniform Concurrency TestingProceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3669940.3707214(1003-1019)Online publication date: 30-Mar-2025
    • (2025)Thread-sensitive fuzzing for concurrency bug detectionComputers & Security10.1016/j.cose.2024.104171148(104171)Online publication date: Jan-2025
    • (2024)Race Directed Fuzzing for More Effective Concurrency TestingProceedings of the 2024 The 6th World Symposium on Software Engineering (WSSE)10.1145/3698062.3698063(1-6)Online publication date: 13-Sep-2024
    • (2024)Multi-Dimensional and Message-Guided Fuzzing for Robotic Programs in Robot Operating SystemProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 210.1145/3620665.3640425(763-778)Online publication date: 27-Apr-2024
    • (2024)Reorder Pointer Flow in Sound Concurrency Bug PredictionProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3623300(1-13)Online publication date: 20-May-2024
    • (2024)A systematic review of fuzzingSoft Computing - A Fusion of Foundations, Methodologies and Applications10.1007/s00500-023-09306-228:6(5493-5522)Online publication date: 1-Mar-2024
    • (2024)Detect atomicity violations in concurrent programs through user assistance and identification of suspicious variable access patternsJournal of Software: Evolution and Process10.1002/smr.272537:1Online publication date: 3-Sep-2024
    • (2023)DDRaceProceedings of the 32nd USENIX Conference on Security Symposium10.5555/3620237.3620397(2849-2866)Online publication date: 9-Aug-2023
    • (2023)RaceBench: A Triggerable and Observable Concurrency Bug BenchmarkProceedings of the 2023 ACM Asia Conference on Computer and Communications Security10.1145/3579856.3595787(415-428)Online publication date: 10-Jul-2023
    • (2023)WAFFLE: Exposing Memory Ordering Bugs Efficiently with Active Delay InjectionProceedings of the Eighteenth European Conference on Computer Systems10.1145/3552326.3567507(111-126)Online publication date: 8-May-2023
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media