Abstract
Concurrency bugs are as equally vulnerable as the bugs found in the single-threaded programs and these bugs can be exploited using concurrency attacks. Unfortunately, there is not much literature available in detecting various kinds of concurrency issues in a multi-threaded program due to its complexity and uncertainty. In this paper, we aim at detecting concurrency bugs by using directed evolutionary fuzzing with the help of static analysis of the source code. Concurrency bug detection involves two main entities: an input and a particular thread execution order. The evolutionary part of fuzzing will prefer inputs that involve memory access patterns across threads (data flow interleaving) and thread ordering that disturb the data dependence more and direct them to trigger concurrency bugs. This paper suggests the idea of a concurrency fuzzer, which is first of its kind. We use a combination of LLVM, Thread Sanitizer and fuzzing techniques to detect various concurrency issues in an application. The source code of the application is statically analyzed for various paths, from the different thread related function calls to the main function. Every basic block in these paths are assigned a unique ID and a weight based on the distance of the basic block from the thread function calls. These basic blocks are instrumented to print their ID and weight upon execution. The knowledge about the basic blocks in the sliced paths are used to generate new sets of inputs from the old ones, thus covering even more basic blocks in the path and thereby increasing the chances of hitting a concurrency warning. We use Thread Sanitizer present in the LLVM compiler infrastructure to detect the concurrency bug warnings while executing each input. The inputs are directed to discover even new address locations with possible concurrency issues. The system was tested on three simple multi-threaded applications pigz, pbzip2, and pixz. The results show a quicker detection of unique addresses in the application with possible concurrency issues.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Change history
20 May 2020
Concurrency bugs are as equally vulnerable as the bugs found in the single-threaded programs and these bugs can be exploited using concurrency attacks.
References
Llvm. https://llvm.org/
Thread sanitizer. url. http://clang.llvm.org/docs/threadsanitizer.html
Musuvathi, M., Qadeer, S.: Iterative context bounding for systematic testing of multithreaded programs. In: pldi (2007)
Seo, E., Zhou, Y., Lu, S., Park, S.: Learning from mistakes a comprehensive study on real world concurrency bug characteristics. ACM Trans. Comput. Syst. 2(4), 277–288 (2008). ISSN 0734-2071
Common vulnerabilities and exposures database. http://cvedetails.com
Stolfo, S., Sethumadhavan, S., Yang, J., Cui, A.: Concurrency attacks. In: Fourth USENIX Workshop on Hot Topics in Parallelism (HOTPAR 12) (2012)
Fredriksen, L., Miller, B.P., So, B.: An empirical study of the reliability of unix utilities. Commun. ACM 33(12), 3244 (1990)
Kumar, A., Cojocar, L., Giuffrida, C., Rawat, S., Jain, V., Bos, H.: Vuzzer: application-aware evolutionary fuzzing. In: Proceedings of the Network and Distributed System Security Symposium (NDSS) (2017)
Apple developer page for llvm thread sanitizer
Pbzip2. http://compression.ca/pbzip2/
Pigz. https://zlib.net/pigz/
Bzip. http://www.bzip.org/
Pixz man page. https://www.mankier.com/1/pixz
Libavi. https://libav.org/
Imagemagick. https://www.imagemagick.org/script/download.php
Linux kernel bug on uselib(). http://osvdb.org/show/osvdb/12791
Mysql bug 24988. https://bugs.mysql.com/bug.php?id=24988
Msie javaprxy.dll com object exploit. http:// www.exploit-db.com/exploits/1079/
Cve-2010-0923. http://www.cvedetails.com/cve/cve-2010-0923
Cve-2008-0034. http://www.cvedetails.com/cve/cve-2008-0034/
Cve-2010-1754. http://www.cvedetails.com/cve/cve-2010-1754/
Nelson, G., Sobalvarro, P., Anderson, T., Savage, S., Burrows, M.: Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst. 15(4), 391–411 (1997)
Chen, W., Yu, Y., Rodeheffer, T.: Racetrack: efficient detection of data race conditions via adaptive tracking. In: Proceedings of the 20th ACM Symposium on Operating Systems Principles (SOSP 05), pp. 221–234 (2005)
Ashcraft, K., Engler, D.: Racerx: effective, static detection of race conditions and deadlocks. In: Proceedings of the 19th ACM Symposium on Operating Systems Principles (SOSP 03), pp. 237–252 (2003)
Hu, C., Ma, X., Jiang, W., Li, Z., Popa, R.A., Lu, S., Park, S., Zhou, Y.: Muvi: automatically inferring multivariable access correlations and detecting related semantic and concurrency bugs. In: Proceedings of the 21st ACM Symposium on Operating Systems Principles (SOSP 07), pp. 103–116 (2007)
Qin, F., Lu, S., Tucek, J., Zhou, Y.: Avio: detecting atomicity violations via access interleaving invariants. In: Twelfth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS 06), pp. 37–48 (2006)
Olichandran, R., Scherpelz, J., Jin, G., Lu, S., Zhang, W., Lim, J., Reps, T.: Conseq: detecting concurrency bugs through sequential errors. In: Sixteenth International Conference on Architecture Support for Program- ming Languages and Operating Systems (ASPLOS 11), pp. 251–264 (2011)
Sun, C., Zhang, W., Lu, S.: Conmem: detecting severe concurrency bugs through an effect-oriented approach. In: Fifteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS 10), pp. 179–192 (2010)
Chen, P.M., Flinn, J., Wester, B., Devecsery, D., Narayanasamy, S.: Parallelizing data race detection. In: Eighteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS 13), pp. 27–38 (2013)
Zamfir, C., Kasikci. B., Candea, G.: Racemob: crowdsourced data race detection. In: Proceedings of the 24th ACM Symposium on Operating Systems Principles (SOSP 13) (2013)
Martin, M.M.K., Nagarakatte, S., Burckhardt, S., Musuvathi, M.: Multicore acceleration of priority-based schedulers for concurrency bug detection. In: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation(PLDI ’12) (2012)
Lu, S., Park, S., Zhou, Y.: Ctrigger: exposing atomicity violation bugs from their hiding places. In: Fourteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS 09), pp. 25–36 (2009)
Park, C.-S., Sen K.: Randomized active atomicity violation detection in concurrent programs. In: Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of Software Engineering (SIG- SOFT 08/FSE-16), pp. 135–145 (2008)
Sen, K.: Race directed random testing of concurrent programs. In: Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation (PLDI 08), pp. 11–21 (2008)
Pereira, C., Pokam, G., Kasikci, B., Schubert, B., Candea, G.: Failure sketching: a technique for automated root cause diagnosis of inproduction failures. In: Proceedings of the 25th ACM Symposium on Operating Systems Principles (SOSP 15) (2015)
Chow, M., Attariyan, M., Flinn, J.: X-ray: automat- ing root-cause diagnosis of performance anomalies in production software. In: OSDI (2012)
Deng, D., Liblit, B., Jin, G., Zhang, W., Lu, S.: Automated concurrency bug fixing. In: Proceedings of the Tenth Symposium on Operating Systems Design and Implementation (OSDI 12), pp. 221–236 (2012)
Cristian, Z., Jula, H., Tralamazza, D., George, C.: Deadlock immunity: enabling systems to defend against deadlocks. In: Proceedings of the Eighth Symposium on Operating Systems Design and Implementation (OSDI 08), pp. 295–308 (2008)
Kudlur, M., Lafortune, S., Wang, Y., Kelly, T., Mahlke, S.: Gadara: dynamic deadlock avoidance for multithreaded programs. In: Proceedings of the Eighth Symposium on Operating Systems Design and Implementation (OSDI 08), pp. 281–294 (2008)
Cui, H., Wu, J., Yang, J.: Bypassing races in live applications with execution filters. In: Proceedings of the Ninth Symposium on Operating Systems Design and Implementation (OSDI 10) (2010)
Whaley, J., Naik, M., Aiken, A.: Effective static race detection for java. In: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 06), pp. 308–319 (2006)
Zhang, Weihua, Yu, Shiqiang, Wang, Haojun, Dai, Zhuofang, Chen, Haibo: Hardware support for concurrent detection of multiple concurrency bugs on fused cpu-gpu architectures. IEEE Trans. Comput. 65, 3083–3095 (2016)
Alam, M.U., Begam, R., Rahman, S., Muzahid, A.: Concurrency bug detection and avoidance through continuous learning of invariants using neural networks in hardware (2013)
Gotovos, A., Christakis, M., Sagonas, K.: Systematic testing for detecting concurrency errors in erlang programs. In: Proceedings of the 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation (ICST ’13), pp. 154–163 (2013)
Fredriksen, L., Miller, B.P., So, B.: An empirical study of the reliability of unix utilities. Commun. ACM 33(12), 32–44 (1990)
Aitel, D.: An introduction to spike, the fuzzer creation kit. (presentation slides) (2002)
Sutton, M., Greene, A.: The art of file format fuzzing. In: Blackhat USA Conference (2005)
Leek, T., Ganesh, V., Rinard, M.: Taint-based directed whitebox fuzzing. In: Proceedings of the 31st International Conference on Software Engineering, pp. 474–484. IEEE Computer Society (2009)
Rebert, A., Cha, S.K., Avgerinos, T., Brumley, D.: Unleashing mayhem on binary code. In: 2012 IEEE Symposium on Security and Privacy (SP), pp. 380–394 (2012)
Neugschwandtner, M., Haller, I., Slowinska, A., Bos, H.: Dowsing for overflows: a guided fuzzer to find buffer boundary violations. In: USENIX Security Symposium, pp. 49–64 (2013)
American fuzzy loop (afl-fuzz). https://github.com/rc0r/afl-fuzz
Salls, C., Dutcher, A., Wang, R., Corbetta, J., Shoshitaishvili, Y., Kruegel, C., Stephens, N., Grosen, J., Vigna, G.: Driller: augmenting fuzzing through selective symbolic execution. In: NDSS, vol. 16, pp. 1–16 (2016)
Livshits, V.B., Lam, M.S.: Finding security errors in java programs with static analysis. In: Proceedings of the 14th Usenix Security Symposium, pp. 271–286 (2005)
Arp, D., Yamaguchi, F., Golde, N., Rieck, K.: Modeling and discovering vulnerabilities with code property graphs. In: Proceedings of the 2014 IEEE Symposium on Security and Privacy (SP 14), pp. 590–604 (2014)
Kruegel, C., Felmetsger, V., Cavedon, L., Vigna, G.: Toward automated detection of logic vulnerabilities in web applications. In: Proceedings of the 19th USENIX Conference on Security (USENIX Security 10), pp. 1010 (2010)
Fritz, C., Bodden, E., Bartel, A., Klein, J., Le Traon, Y., Octeau, D., Arzt, S., Rasthofer, S., McDaniel, P.: Flowdroid: precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for android apps. In: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI14), pp. 259–269 (2014)
McKinley, K.S., Srivastava, V., Bond, M.D., Shmatikov, V.: A security policy oracle: detecting security holes using multiple api implementations. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 11), pp. 343–354 (2011)
Edwards, A., Zhang, X., Jaeger, T.: Using cqual for static analysis of authorization hook placement. In: Proceedings of the 11th USENIX Security Symposium, page p. 33–48 (2002)
Zhao, J., Ning, Y., Cui, H., Yang, J., Gu, R., Gan, B.: Understanding and Detecting Concurrency Attacks
Data flow sanitizer. http://clang.llvm.org/docs/dataflowsanitizer.html
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Vinesh, N., Sethumadhavan, M. (2020). ConFuzz—A Concurrency Fuzzer. In: Luhach, A., Kosa, J., Poonia, R., Gao, XZ., Singh, D. (eds) First International Conference on Sustainable Technologies for Computational Intelligence. Advances in Intelligent Systems and Computing, vol 1045. Springer, Singapore. https://doi.org/10.1007/978-981-15-0029-9_53
Download citation
DOI: https://doi.org/10.1007/978-981-15-0029-9_53
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-15-0028-2
Online ISBN: 978-981-15-0029-9
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)