{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,5]],"date-time":"2026-09-05T16:15:04Z","timestamp":1788624904588,"version":"build-2803163510"},"reference-count":66,"publisher":"MDPI AG","issue":"2","license":[{"start":{"date-parts":[[2020,6,8]],"date-time":"2020-06-08T00:00:00Z","timestamp":1591574400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Computers"],"abstract":"<jats:p>Memory errors are still a serious threat affecting millions of devices worldwide. Recently, bounty programs have reached a new record, paying up to USD 2.5 million for one single vulnerability in Android and up to USD 2 million for Apple\u2019s operating system. In almost all cases, it is common to exploit memory errors in one or more stages to fully compromise those devices. In this paper, we review and discuss the importance of memory error vulnerabilities, and more specifically stack buffer overflows to provide a full view of how memory errors are exploited. We identify the root causes that make those attacks possible on modern x86-64 architecture in the presence of modern protection techniques. We have analyzed how unsafe library functions are prone to buffer overflows, revealing that although there are secure versions of those functions, they are not actually preventing buffer overflows from happening. Using secure functions does not result in software free from vulnerabilities and it requires developers to be security-aware. To overcome this problem, we discuss the three main security protection techniques present in all modern operating system; the non-eXecutable bit (NX), the Stack Smashing Protector (SSP) and the Address Space Layout Randomization (ASLR). After discussing their effectiveness, we conclude that although they provide a strong level of protection against classical exploitation techniques, modern attacks can bypass them.<\/jats:p>","DOI":"10.3390\/computers9020048","type":"journal-article","created":{"date-parts":[[2020,6,9]],"date-time":"2020-06-09T04:19:39Z","timestamp":1591676379000},"page":"48","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":6,"title":["A Review of Memory Errors Exploitation in x86-64"],"prefix":"10.3390","volume":"9","author":[{"given":"Conor","family":"Pirry","sequence":"first","affiliation":[{"name":"School of Computing, Engineering and Physical Sciences, University of the West of Scotland, High Street, Paisley PA1 2BE, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6976-5763","authenticated-orcid":false,"given":"Hector","family":"Marco-Gisbert","sequence":"additional","affiliation":[{"name":"School of Computing, Engineering and Physical Sciences, University of the West of Scotland, High Street, Paisley PA1 2BE, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Carolyn","family":"Begg","sequence":"additional","affiliation":[{"name":"School of Computing, Engineering and Physical Sciences, University of the West of Scotland, High Street, Paisley PA1 2BE, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2020,6,8]]},"reference":[{"key":"ref_1","unstructured":"Younan, Y. (2019, February 12). 25 Years of Vulnerabilities: 1988\u20132012. Available online: https:\/\/maxedv.com\/wp-content\/uploads\/2011\/12\/Sourcefire-25-Years-of-Vulnerabilities-Research-Report.pdf."},{"key":"ref_2","unstructured":"Meer, H. (2019, February 12). Memory Corruption Attacks: The (almost) Complete History. Available online: https:\/\/media.blackhat.com\/bh-us-10\/whitepapers\/Meer\/BlackHat-USA-2010-Meer-History-of-Memory-Corruption-Attacks-wp.pdf."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Anderson, P.J. (1972). Computer Security Technology Planning Study, Available online: http:\/\/seclab.cs.ucdavis.edu\/projects\/history\/papers\/ande72.pdf.","DOI":"10.21236\/AD0772806"},{"key":"ref_4","unstructured":"Fowler, S. (2019, March 05). CVE-2019-3822 curl: NTLMv2 type-3 Header Stack Buffer Overflow. Available online: https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=CVE-2019-3822."},{"key":"ref_5","unstructured":"(2019, March 05). curl. Available online: https:\/\/curl.haxx.se\/libcurl\/features.html."},{"key":"ref_6","unstructured":"Stenberg, D. (2015). Everything Curl, GitBook."},{"key":"ref_7","unstructured":"Aleph One (1996). Smashing the Stack for Fun and Profit. Phrack, 7."},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Cowan, C., and Pu, C. (1998, January 22\u201325). Death, Taxes and Imperfect Software: Surviving the Inevitable. Proceedings of the 1998 Workshop on New Security Paradigms, Charlottsville, VA, USA.","DOI":"10.1145\/310889.310915"},{"key":"ref_9","unstructured":"McConnell, S. (2004). Code Complete, Microsoft Press. [2nd ed.]."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Younan, Y., Pozza, D., Piessens, F., and Joosen, W. (2006, January 6\u20138). Extended protection against stack smashing attacks without performance loss. Proceedings of the ACSAC, Shanghai, China.","DOI":"10.1109\/ACSAC.2006.27"},{"key":"ref_11","unstructured":"Bulba, and Kil3r (2002). Bypassing StackGuard and StackShield. Phrack, 10, 56."},{"key":"ref_12","unstructured":"Richarte, G. (2019, February 12). Four different tricks to bypass StackShield and StackGuard protection. Available online: https:\/\/www.cs.purdue.edu\/homes\/xyzhang\/spring07\/Papers\/defeat-stackguard.pdf."},{"key":"ref_13","unstructured":"Marco-Gisbert, H., and Ripoll-Ripoll, I. (2018). Return-to-csu: A New Method to Bypass 64-bit Linux ASLR, Black Hat. Available online: https:\/\/i.blackhat.com\/briefings\/asia\/2018\/asia-18-Marco-return-to-csu-a-new-method-to-bypass-the-64-bit-Linux-ASLR-wp.pdf."},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Shacham, H., Page, M., Pfaff, B., Goh, E.J., Modadugu, N., and Boneh, D. (2004, January 25\u201329). On the effectiveness of address-space randomization. Proceedings of the 11th ACM Conference on Computer and Communications Security, Washington, DC, USA.","DOI":"10.1145\/1030083.1030124"},{"key":"ref_15","unstructured":"Marco-Gisbert, H., and Ripoll-Ripoll, I. (2014, January 18\u201321). On the Effectiveness of Full-ASLR on 64-bit Linux. Proceedings of the In-Depth Security Conference (DeepSec), Vienna, Austria."},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Tran, M., Etheridge, M., Bletsch, T., Jiang, X., Freeh, V., and Ning, P. (2011, January 20\u201321). On the expressiveness of return-into-libc attacks. Proceedings of the 14th International Conference on Recent Advances in Intrusion Detection, Menlo Park, CA, USA.","DOI":"10.1007\/978-3-642-23644-0_7"},{"key":"ref_17","unstructured":"Wojtczuk, R. (2001). The advanced return-into-lib(c) exploits: PaX case study. Phrack, 58, Available online: http:\/\/phrack.org\/issues\/58\/4.html."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"2:1","DOI":"10.1145\/2133375.2133377","article-title":"Return-Oriented Programming: Systems, Languages, and Applications","volume":"15","author":"Roemer","year":"2012","journal-title":"ACM Trans. Inf. Syst. Secur."},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Marco-Gisbert, H., and Ripoll, I. (2013, January 22\u201324). Preventing Brute Force Attacks Against Stack Canary Protection on Networking Servers. Proceedings of the 12th International Symposium on Network Computing and Applications, Cambridge, MA, USA.","DOI":"10.1109\/NCA.2013.12"},{"key":"ref_20","unstructured":"Cowan, C., Pu, C., Maier, D., Walpole, J., Bakke, P., Beattie, S., Grier, A., Wagle, P., and Zhang, Q. (1998, January 26\u201329). StackGuard: Automatic Adaptive Detection and Prevention of Buffer-Overflow Attacks. Proceedings of the 7th USENIX Security Symposium, San Antonio, TX, USA."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"519","DOI":"10.1007\/s10207-018-00425-8","article-title":"SSPFA: Effective stack smashing protection for Android OS","volume":"18","year":"2019","journal-title":"Int. J. Inf. Secur."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Marco-Gisbert, H., and Ripoll-Ripoll, I. (2019). Address Space Layout Randomization Next Generation. Appl. Sci., 9.","DOI":"10.3390\/app9142928"},{"key":"ref_23","unstructured":"Pax Team (2019, July 17). PaX Address Space Layout Randomization (ASLR). Available online: http:\/\/pax.grsecurity.net\/docs\/aslr.txt."},{"key":"ref_24","first-page":"28","article-title":"New Chips Stop Buffer Overflow Attacks","volume":"37","author":"Paulson","year":"2004","journal-title":"Computer"},{"key":"ref_25","unstructured":"Edgecombe, R. (2019, January 9\u201311). Touch But Don\u2019T Look: Running the Kernel in Execute Only Memory. Proceedings of the Linux Plumbers Conference, Lisbon, Portugal. Available online: https:\/\/linuxplumbersconf.org\/event\/4\/contributions\/283\/attachments\/357\/588\/Touch_but_dont_look__Running_the_kernel_in_execute_only_memory-presented.pdf."},{"key":"ref_26","unstructured":"Xu, J., Kalbarczyk, Z., and Iyer, R. (2003, January 6\u20138). Transparent runtime randomization for security. Proceedings of the 22nd International Symposium on Reliable Distributed Systems, Florence, Italy."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Zhan, X., Zheng, T., and Gao, S. (July, January 30). Defending ROP Attacks Using Basic Block Level Randomization. Proceedings of the 2014 IEEE Eighth International Conference on Software Security and Reliability-Companion (SERE-C), San Francisco, CA, USA.","DOI":"10.1109\/SERE-C.2014.28"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Kil, C., Jim, J., Bookholt, C., Xu, J., and Ning, P. (2006, January 11\u201315). Address space layout permutation (ASLP): Towards fine-grained randomization of commodity software. Proceedings of the Computer Security Applications Conference, Miami Beach, FL, USA.","DOI":"10.1109\/ACSAC.2006.9"},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Iyer, V., Kanitkar, A., Dasgupta, P., and Srinivasan, R. (2010, January 1\u20134). Preventing Overflow Attacks by Memory Randomization. Proceedings of the 2010 IEEE 21st International Symposium on Software Reliability Engineering (ISSRE), San Jose, CA, USA.","DOI":"10.1109\/ISSRE.2010.22"},{"key":"ref_30","unstructured":"Raadt, T.D. (2005, January 5\u20136). Exploit Mitigation Techniques (Updated to Include Random Malloc and MMAP). Proceedings of the OpenCON 2005, Venice, Italy."},{"key":"ref_31","unstructured":"Miller, K. (2008, January 11\u201312). OpenBSD\u2019s Position Independent Executable (PIE) Implementation. Proceedings of the NYCBSDCon, New York, NY, USA."},{"key":"ref_32","unstructured":"Russinovich, M. (2007). Inside the Windows Vista Kernel: Part 3, Microsfot. Available online: https:\/\/docs.microsoft.com\/en-us\/previous-versions\/technet-magazine\/cc162458(v=msdn.10)."},{"key":"ref_33","unstructured":"Whitehouse, O. (2007). An Analysis of Address Space Layout Randomization on Windows Vista, Symantec Advanced Threat Research, Black Hat. Available online: https:\/\/www.blackhat.com\/presentations\/bh-dc-07\/Whitehouse\/Paper\/bh-dc-07-Whitehouse-WP.pdf."},{"key":"ref_34","unstructured":"Ruoho, C. (2008). ASLR: Leopard Versus Vista, Laconic Security."},{"key":"ref_35","unstructured":"\u2018xorl\u2019 (2010). Linux GLibC Stack Canary Values."},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Bittau, A., Belay, A., Mashtizadeh, A., Mazi\u00e8res, D., and Boneh, D. (2014, January 18\u201321). Hacking Blind. Proceedings of the 35th IEEE Symposium on Security and Privacy, Berkeley, CA, USA. Available online: http:\/\/www.ieee-security.org\/TC\/SP2014\/papers\/HackingBlind.pdf.","DOI":"10.1109\/SP.2014.22"},{"key":"ref_37","unstructured":"(2019, July 17). Available online: https:\/\/www.amd.com\/system\/files\/TechDocs\/24592.pdf."},{"key":"ref_38","unstructured":"ISO\/IEC (2019, February 18). Working Draft, Standard for Programming Language C++ [Online, C++ International Standard, N4800]. Available online: https:\/\/www.iso.org\/standard\/74528.html."},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Matz, M., Hubi\u010dka, J., Jaeger, A., and Mitchell, M. (2019, July 17). System V Application Binary Interface. Available online: https:\/\/uclibc.org\/docs\/psABI-x86_64.pdf.","DOI":"10.2134\/csa2019.64.1007"},{"key":"ref_40","unstructured":"Intel (2019, July 17). Intel 64 and IA-32 Architecture Software Developer\u2019s Manual. Available online: https:\/\/www.intel.com\/content\/dam\/www\/public\/us\/en\/documents\/manuals\/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf."},{"key":"ref_41","unstructured":"Kerrisk, M. (2010). The Linux Programming Interface: A Linux and UNIX System Programming Handbook, No Starch Press."},{"key":"ref_42","unstructured":"Anley, C., Heasman, J., Lindner, F., and Richarte, G. (2007). The Shellcoder\u2019s Handbook: Discovering and Exploiting Security Holes, John Wiley & Sons, Inc.. [2nd ed.]."},{"key":"ref_43","unstructured":"Yurichev, D. (2019, July 17). Reverse Engineering for Beginners (Understanding Assembly Language). Available online: https:\/\/yurichev.com\/writings\/RE4B-EN.pdf."},{"key":"ref_44","unstructured":"Eilam, E. (2005). Reversing: Secrets of Reverse Engineering, Wiley Publishing, Inc."},{"key":"ref_45","doi-asserted-by":"crossref","unstructured":"Foster, J.C., Osipov, V., Bhalla, N., and Heinen, N. (2005). Buffer Overflow Attacks: Detect, Exploit, Prevent, Syngress Publishing Inc.","DOI":"10.1016\/B978-193226667-2\/50037-2"},{"key":"ref_46","unstructured":"Weidman, G. (2014). Penetration Testing: A Hands-On Introduction to Hacking, William Pollock."},{"key":"ref_47","unstructured":"Baratloo, A., Singh, N., and Tsai, T. (2000, January 18\u201323). Transparent Run-time Defense Against Stack Smashing Attacks. Proceedings of the 2000 USENIX Annual Technical Conference, San Diego, CA, USA."},{"key":"ref_48","unstructured":"Wheeler, A.D. (2019, July 17). Secure Programming HOWTO. Available online: https:\/\/www.tldp.org\/HOWTO\/pdf\/Secure-Programs-HOWTO.pdf."},{"key":"ref_49","unstructured":"Gustedt, J. (2016). Modern C, Manning Publications."},{"key":"ref_50","unstructured":"Miller, T.C., and de Raadt, T. (1999, January 6\u201311). strlcpy and strlcat\u2014Consistent, Safe, String Copy and Concatenation. Proceedings of the FREENIX Track: 1999 USENIX Annual Technical Conference, Monterey, CA, USA."},{"key":"ref_51","unstructured":"Kc, G.S., and Keromytis, A.D. (2005, January 5\u20139). e-NeXSh: Achieving an Effectively Non-Executable Stack and Heap via System-Call Policing. Proceedings of the 21st Annual Computer Security Applications Conference, Tucson, AZ, USA."},{"key":"ref_52","doi-asserted-by":"crossref","unstructured":"Sayeed, S., Marco-Gisbert, H., Ripoll-Ripoll, I., and Birch, M. (2019). Control-Flow Integrity: Attacks and Protections. Appl. Sci., 9.","DOI":"10.3390\/app9204229"},{"key":"ref_53","unstructured":"\u201czbt\u201d (2019, February 16). Linux\/x86-64\u2014reboot(POWER_OFF)\u201419 Bytes. Available online: http:\/\/shell-storm.org\/shellcode\/files\/shellcode-602.php."},{"key":"ref_54","unstructured":"Buchanan, E., Roemer, R., Savage, S., and Shacham, H. (2019, February 12). Return-Orientated Programming: Exploitation without Code Injection. Available online: https:\/\/www.blackhat.com\/presentations\/bh-usa-08\/Shacham\/BH_US_08_Shacham_Return_Oriented_Programming.pdf."},{"key":"ref_55","unstructured":"PaX (2019, February 12). NOEXEC. Available online: https:\/\/pax.grsecurity.net\/docs\/noexec.txt."},{"key":"ref_56","unstructured":"Silberman, P., and Johnson, R. (2019, February 12). A Comparison of Buffer Overflow Prevention Implementations and Weaknesses. Available online: https:\/\/www.blackhat.com\/presentations\/bh-usa-04\/bh-us-04-silberman\/bh-us-04-silberman-paper.pdf."},{"key":"ref_57","unstructured":"Wagle, P., and Cowan, C. (2003, January 25\u201327). StackGuard: Simple Stack Smash Protection for GCC. Proceedings of the GCC Developers Summit, Ottawa, ON, Canada."},{"key":"ref_58","unstructured":"Cowan, C., Beattie, S., Pu, C., Wagle, P., and Walthinsen, E. (1999). Protecting Systems from Stack Smashing Attacks with StackGuard, Institute of Science & Technology."},{"key":"ref_59","unstructured":"Marco, H. (2020, May 25). Root Shell on Sniffit. Available online: http:\/\/hmarco.org\/bugs\/CVE-2014-5439-sniffit_0.3.7-stack-buffer-overflow.html."},{"key":"ref_60","unstructured":"Huawei Technologies Co., Ltd. (2020, May 25). Information Leak Vulnerability in Some Huawei Products. Available online: https:\/\/www.huawei.com\/en\/psirt\/security-advisories\/huawei-sa-20191030-01-phone-en."},{"key":"ref_61","doi-asserted-by":"crossref","unstructured":"Marco-Gisbert, H., and Ripoll-Ripoll, I. (2014). On the Effectiness of NX, SSP, RenewSSP and ASLR against Stack Buffer Overflows, IEEE.","DOI":"10.1109\/NCA.2014.28"},{"key":"ref_62","unstructured":"Jelinek, J. (2019, July 17). Object Size Checking to pRevent (Some) Buffer Overflows (GCC FORTIFY). Available online: http:\/\/gcc.gnu.org\/ml\/gcc-patches\/2004-09\/msg02055.html."},{"key":"ref_63","doi-asserted-by":"crossref","unstructured":"Kc, G.S., Keromytis, A.D., and Prevelakis, V. (2003, January 27\u201331). Countering Code-Injection Attacks With Instruction-Set Randomization. Proceedings of the 10th ACM Conference on Computer and Communications Security, Washington, DC, USA.","DOI":"10.1145\/948109.948146"},{"key":"ref_64","unstructured":"Marco-Gisbert, H. (2015). Cyber-Security Protection Techniques to Mitigate Memory Errors Exploitation. [Ph.D. Thesis, Universitat Polit\u00e8cnica de Val\u00e8ncia]."},{"key":"ref_65","doi-asserted-by":"crossref","unstructured":"Gras, B., Ravazi, K., Bosman, E., Bos, H., and Giuffrida, C. (2017). ASLR on the Line: Practical Cache Attacks on the MMU, Network and Distributed System Security Symposium (NDSS).","DOI":"10.14722\/ndss.2017.23271"},{"key":"ref_66","doi-asserted-by":"crossref","unstructured":"G\u00f6ktas, E., Athanasopoulos, E., Bos, H., and Portokalidis, G. (2014, January 18\u201321). Out of Control: Overcoming Control-Flow Integrity. Proceedings of the 2014 IEEE Symposium on Security and Privacy, San Jose, CA, USA.","DOI":"10.1109\/SP.2014.43"}],"container-title":["Computers"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2073-431X\/9\/2\/48\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T09:36:52Z","timestamp":1760175412000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2073-431X\/9\/2\/48"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,6,8]]},"references-count":66,"journal-issue":{"issue":"2","published-online":{"date-parts":[[2020,6]]}},"alternative-id":["computers9020048"],"URL":"https:\/\/doi.org\/10.3390\/computers9020048","relation":{},"ISSN":["2073-431X"],"issn-type":[{"value":"2073-431X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2020,6,8]]}}}