MemScroll: Dynamic Memory Errors Detector in C Programs

Author(s):  
Dae Wan Cho ◽  
Seunguk Oh ◽  
Hyeon Soo Kim
Author(s):  
Anna Trikalinou ◽  
Nikolaos Bourbakis

Memory errors have long been a critical security issue primarily for C/C++ programming languages and are still considered one of the top three most dangerous software errors according to the MITRE ranking. In this paper the authors focus on their exploitation via control-flow hijacking and data-only attacks (stack, and partially heap (G. Novarck & E. Berger, 2010)) by proposing a synergistic security methodology, which can accurately detect and thwart them. Their methodology is based on the Dynamic Information Flow Tracking (DIFT) technique and improves its data-only attack detection by utilizing features from the Reverse Stack Execution (RSE) security technique. Thus, the authors can significantly lower the resource consumption of the latter methodology, while increasing the former's accuracy. Their proof-of-concept compiler implementation verifies their assumptions and is able to protect vulnerable C programs against various real-world attack scenarios.


1996 ◽  
Vol 31 (5) ◽  
pp. 44-53 ◽  
Author(s):  
David Evans

2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-28
Author(s):  
Karl Cronburg ◽  
Samuel Z. Guyer

Dynamic memory managers are a crucial component of almost every modern software system. In addition to implementing efficient allocation and reclamation, memory managers provide the essential abstraction of memory as distinct objects, which underpins the properties of memory safety and type safety. Bugs in memory managers, while not common, are extremely hard to diagnose and fix. One reason is that their implementations often involve tricky pointer calculations, raw memory manipulation, and complex memory state invariants. While these properties are often documented, they are not specified in any precise, machine-checkable form. A second reason is that memory manager bugs can break the client application in bizarre ways that do not immediately implicate the memory manager at all. A third reason is that existing tools for debugging memory errors, such as Memcheck, cannot help because they rely on correct allocation and deallocation information to work. In this paper we present Permchecker, a tool designed specifically to detect and diagnose bugs in memory managers. The key idea in Permchecker is to make the expected structure of the heap explicit by associating typestates with each piece of memory. Typestate captures elements of both type (e.g., page, block, or cell) and state (e.g., allocated, free, or forwarded). Memory manager developers annotate their implementation with information about the expected typestates of memory and how heap operations change those typestates. At runtime, our system tracks the typestates and ensures that each memory access is consistent with the expected typestates. This technique detects errors quickly, before they corrupt the application or the memory manager itself, and it often provides accurate information about the reason for the error. The implementation of Permchecker uses a combination of compile-time annotation and instrumentation, and dynamic binary instrumentation (DBI). Because the overhead of DBI is fairly high, Permchecker is suitable for a testing and debugging setting and not for deployment. It works on a wide variety of existing systems, including explicit malloc/free memory managers and garbage collectors, such as those found in JikesRVM and OpenJDK. Since bugs in these systems are not numerous, we developed a testing methodology in which we automatically inject bugs into the code using bug patterns derived from real bugs. This technique allows us to test Permchecker on hundreds or thousands of buggy variants of the code. We find that Permchecker effectively detects and localizes errors in the vast majority of cases; without it, these bugs result in strange, incorrect behaviors usually long after the actual error occurs.


2017 ◽  
Author(s):  
Gina T Bednarek ◽  
Kristin Shutts

The present research tested whether three-year-old children – like older children and adults – automatically encode other people’s gender. Three-year-old participants (N = 24) learned facts about unfamiliar target children who varied in gender and were asked to remember facts about the targets during a test phase. At test, children made more within-category memory errors (e.g., misattributing a fact associated with one girl to another girl) than between-category errors (e.g., misattributing a fact associated with a girl to a boy). The findings suggest that at least as early as three years of age, children automatically encode whether someone is a boy or a girl upon first meeting them. The results have implications for our understanding of the automaticity and emergence of stereotyping processes.


Sign in / Sign up

Export Citation Format

Share Document