Architectural Bound Checking for Buffer-Overflow Protection

Total Page:16

File Type:pdf, Size:1020Kb

Architectural Bound Checking for Buffer-Overflow Protection 162 ECTI TRANSACTIONS ON COMPUTER AND INFORMATION TECHNOLOGY VOL.14, NO.2 November 2020 Boundary Bit: Architectural Bound Checking for Buffer-Overflow Protection Sirisara Chiamwongpaet1 and Krerk Piromsopa2, Members ABSTRACT return addresses and function pointers). Few of them We propose Boundary Bit, a new architectural can prevent buffer overflow on arbitrary data (e.g. bound-checking approach that detects and prevents pointers, arrays and function arguments). We be- buffer-overflow attacks. Boundary Bit extends an ar- lieve the existence of buffer overflow is a result of an chitecture by associating a bit to each memory en- insufficient foundation at the architectural level. try. Software can set a (boundary) bit to delimit an object. On each memory access, the hardware 1.1 Concept will dynamically validate the object's bound using Boundary Bit provides bound checking at the ar- the boundary bit. With minimal hints from the com- chitectural level by ensuring that transferred data piler, our architectural design eliminates most (if not cannot exceed the allocated capacity of buffers. all) types of buffer-overflow attacks. These include at- While many hardware solutions (such as segmenta- tacks on non-control data (variables and arguments) tion [25] and tag architecture [12]) exist, some of them and array-indexing errors. We evaluated the perfor- (e.g. segmentation) are, however, not common to all mance of Boundary Bit using simulation, and the architectures. In supported systems, the mechanism results show that the majority of performance over- is usually ignored in favor of performance or compati- heads lies in bit scanning operations. To mitigate per- bility. We believe a light-weight architectural solution formance overhead, we introduce a hardware bitmap is the key to the success of buffer-overflow protection. to act as a cache. The results from our simulation To enforce bound checking without sacrificing per- show that the hardware bitmap can absorb most of formance, Boundary Bit associates an extra bit with the overhead from bit scanning, which in the best- each memory entry. This bit is similar to those of case scenario was 30 times faster than the version Secure Bit's [27] (as well as tag architecture [12]). It that does not utilize a bitmap cache. can do everything Secure Bit does. In addition, it can handle another whole class of attacks that Secure Bit Keywords: Buffer overflow, Invasive software, Se- cannot. curity kernels, Security and protection, System ar- chitectures, Unauthorized access 2. BACKGROUND: BUFFER-OVERFLOW 1. INTRODUCTION ATTACKS Since the creation of the infamous MORRIS worm A buffer-overflow attack can be described as an at- [35] in 1988, buffer-overflow vulnerabilities have been tack in which a buffer is overflowed beyond its bounds used by malicious worms and viruses to exploit nu- into another buffer with an intent to cause malicious merous computer systems. Though it is possible to behavior in a program [4,29,40]. write secure code, no program is guaranteed to be free from bugs. There have been a lot of buffer-overflow 2.1 Classification by Attack Locations vulnerabilities continuously detected and reported. • Stack Overflows These attacks are conducted by For example, even the well-known operating system's copying data larger than the size of an allocated libraries still suffer from buffer-overflow attacks [10]. buffer in the stack. As a result, the overflowed data Moreover, the well-known WannaCry ransomware at- will overwrite the return address. The eventual re- tack in May 2017 exploits a buffer-overflow vulnera- turn instruction at the end of a function will return bility in the most Microsoft Windows versions, in- to execute attackers' code instead of the normal cluding Microsoft Windows 10 SP1 [22]. process flow. However, this stack area may con- Many solutions have been proposed [13,31]. How- tain control data and non-control data. Although ever, they have mostly focused on control data (e.g. the return address is the major target, this type of overflow attack can occur arbitrarily. Manuscript received on August 28, 2019 ; revised on January 15, 2020. • Heap Overflows Similarly to stack-overflow at- Final manuscript received on January 16, 2020. tacks, heap-overflow attacks can modify data by 1;2 The authors are with the Department of Computer Engi- overwriting adjacent memory. The heap memory neering, Chulalongkorn University, Bangkok 10330, Thailand, E-mail: [email protected] and [email protected] stores function pointers and dynamically-allocated DOI: 10.37936/ecti-cit.2020142.212338 data. Such allocation is done by calling the \mal- Boundary Bit: Architectural Bound Checking for Buffer-Overflow Protection 163 loc" function in C language (or a new operation in Guard [6], Minezone RAD [37], Read-only RAD [37], modern object-oriented programming languages). Efficient Dynamic Taint Analysis Using Multicore For example, a function pointer can be changed to Machines [3], HeapDefender [20], Secure Bit [27], and point to attacker's code. Secure Canary Word [29] [4]. For comparison, we also • Array Indexing Errors This type of attack is include our proposed solution, Boundary Bit, in this different from the other types in that it is a result of table. indexing beyond the boundary of an array. Thus, In conclusion, a buffer-overflow protection sum- the attackers can theoretically write to arbitrary mary table with types of buffer-overflow attacks is memory locations. provided as Figure 2. The symbol Xmeans this so- lution can prevent this attack type. The symbol \?" 2.2 Classification Using Characteristics means this solution may prevent this attack type. There is another classification method based on However, the tables show only types of buffer- characteristics, defined by [2], with some precondi- overflow attacks that can be prevented without con- tions as follows. sidering the performance or the limitations. • Direct Executable The target is to change the control flow of the process. This class is comparable 3. BOUNDARY BIT to Stack overflows on control data. (dir:exec = Boundary Bit [5] is a hardware-assisted runtime flen:buff, con:addr, con:inst, mod:radd, bound-checking method that aims to prevent buffer- jmp:stack, exe:stackg overflow attacks on both control and non-control • Indirect Executable The difference from \Direct data. Executable" is that the process state information, To enforce bound checking, Boundary Bit asso- such as a return address, is not altered, but a func- ciates an extra bit with each byte of memory. These tion pointer is indirectly altered instead. When the bits are similar to those of Secure Bit's [27], the Tag function pointer is invoked, attacker's code will be architecture [12], as well as the bound information executed. This class is comparable to Heap over- used by various software-based bound-checking ap- flows on control data. ind:exec = flen:buff, proaches [1,23,24], and are used to delimit boundaries con:addr, mod:fptr, jmp:heap, exe:heapg of buffers. At runtime, these extra bits are used to • Direct Data Buffer-overflow attacks are differ- check whether an access to a buffer is out-of-bounds. ent from executable buffer-overflow attacks in that If an out-of-bounds access is detected, the offending no new instructions (attacker's code) are exe- program is terminated. Specifically, given a buffer cuted. Direct data buffer-overflow attacks modify at address a, if an attempt is made to access data some data which make the execution path change. at index i, Boundary Bit will scan bits from the ad- This class is comparable to the Stack overflows dress min(a,a+i) to max(a,a+i) - 1 in order to de- on non-control data. dir:data = flen:buff, termine whether an access is within the bounds. If, con:ctrl, mod:cvar, flow:ctrlg during the scan, Boundary Bit encounters a set bit • Indirect Data These attacks are similar to the (which signifies an end of the buffer), then it will ter- direct data overflows. The target of indirect minate the program with an error. In case the ending data buffer-overflow attacks is a pointer refer- address (max(a,a+i) -1 ) is less than the beginning ring to the data that can change the execution address (max(a,a+i)), no scanning is required. path. This class is comparable to Heap overflows The following examples further illustrate how on non-control data. ind:data = flen:buff, Boundary Bit works in practice. con:addr, mod:cptr, flow:ctrlg 3.1 Stack-Overflow Detection 2.3 Summary of buffer-overflow attack types The following function contains a potential buffer- From the patterns of buffer-overflow characteris- overflow bug caused by the usage of the unsafe tics and the taxonomy of buffer-overflow solutions, strcpy() function. the relationships between characteristics and existing void func1 ( char ∗p ) f solutions can be summarized as shown in Figure 1. int i ; // 4 b y t e s From the table, the symbol Xmeans this solution can char b [ 8 ] ; // 8 b y t e s prevent this characteristic. The symbol \?" means char ch ; // 1 b y t e the solution may prevent this characteristic (depend- strcpy(b, p); g ing on the implementation). The protection solutions in the table are as fol- Assuming that each variable in the above function lows: Segmentation [25], Integer Analysis to De- has an address in memory as shown in Figure 3a and termine Buffer Overflow [39], STOBO [14], Type- 3b, if the length of input is 8 bytes (the maximum Assisted Buffer Overflow Detection [19], C Range Er- index of the input is 7), the system will scan bits ror Detector (CRED) [32], Jump Pointer [36], Stack- starting at address 0x28ac58 and ending at address Guard [7], MemGuard [7], PointGuard [6], Smash- 0x28ac5e (from 0x28ac58 + 7 - 1), as per the earlier 164 ECTI TRANSACTIONS ON COMPUTER AND INFORMATION TECHNOLOGY VOL.14, NO.2 November 2020 Fig.1:: Summary with buffer-overflow characteristics Fig.2:: Summary with types of buffer-overflow attacks described scheme).
Recommended publications
  • Bounds Checking on GPU
    Noname manuscript No. (will be inserted by the editor) Bounds Checking on GPU Troels Henriksen Received: date / Accepted: date Abstract We present a simple compilation strategy for safety-checking array indexing in high-level languages on GPUs. Our technique does not depend on hardware support for abnormal termination, and is designed to be efficient in the non-failing case. We rely on certain properties of array languages, namely the absence of arbitrary cross-thread communication, to ensure well-defined execution in the presence of failures. We have implemented our technique in the compiler for the functional array language Futhark, and an empirical eval- uation on 19 benchmarks shows that the geometric mean overhead of checking array indexes is respectively 4% and 6% on two different GPUs. Keywords GPU · functional programming · compilers 1 Introduction Programming languages can be divided roughly into two categories: unsafe languages, where programming errors can lead to unpredictable results at run- time; and safe languages, where all risky operations are guarded by run-time checks. Consider array indexing, where an invalid index will lead an unsafe lan- guage to read from an invalid memory address. At best, the operating system will stop the program, but at worst, the program will silently produce invalid results. A safe language will perform bounds checking to verify that the array index is within the bounds of the array, and if not, signal that something is amiss. Some languages perform an abnormal termination of the program and print an error message pointing to the offending program statement. Other languages throw an exception, allowing the problem to be handled by the pro- gram itself.
    [Show full text]
  • Cmsc330 Cybersecurity
    cmsc330 Cybersecurity Cybersecurity Breaches Major security breaches of computer systems are a fact of life. They affect companies, governments, and individuals. Focusing on breaches of individuals' information, consider just a few examples: Equifax (2017) - 145 million consumers’ records Adobe (2013) - 150 million records, 38 million users eBay (2014) - 145 million records Anthem (2014) - Records of 80 million customers Target (2013) - 110 million records Heartland (2008) - 160 million records Vulnerabilities: Security-relevant Defects The causes of security breaches are varied but many of them, including those given above, owe to a defect (or bug) or design flaw in a targeted computer system's software. The software problem can be exploited by an attacker. An exploit is a particular, cleverly crafted input, or a series of (usually unintuitive) interactions with the system, which trigger the bug or flaw in a way that helps the attacker. Kinds of Vulnerability One obvious sort of vulnerability is a bug in security policy enforcement code. For example, suppose you are implementing an operating system and you have code to enforce access control policies on files. This is the code that makes sure that if Alice's policy says that only she is allowed to edit certain files, then user Bob will not be allowed to modify them. Perhaps your enforcement code failed to consider a corner case, and as a result Bob is able to write those files even though Alice's policy says he shouldn't. This is a vulnerability. A more surprising sort of vulnerability is a bug in code that seems to have nothing to do with enforcing security all.
    [Show full text]
  • Safe Arrays Via Regions and Dependent Types
    Safe Arrays via Regions and Dependent Types Christian Grothoff1 Jens Palsberg1 Vijay Saraswat2 1 UCLA Computer Science Department University of California, Los Angeles [email protected], [email protected] 2 IBM T.J. Watson Research Center P.O. Box 704, Yorktown Heights, NY 10598, USA [email protected] Abstract. Arrays over regions of points were introduced in ZPL in the late 1990s and later adopted in Titanium and X10 as a means of simpli- fying the programming of high-performance software. A region is a set of points, rather than an interval or a product of intervals, and enables the programmer to write a loop that iterates over a region. While conve- nient, regions do not eliminate the risk of array bounds violations. Until now, language implementations have resorted to checking array accesses dynamically or to warning the programmer that bounds violations lead to undefined behavior. In this paper we show that a type system for a language with arrays over regions can guarantee that array bounds vi- olations cannot occur. We have developed a core language and a type system, proved type soundness, settled the complexity of the key deci- sion problems, implemented an X10 version which embodies the ideas of our core language, written a type checker for our X10 version, and ex- perimented with a variety of benchmark programs. Our type system uses dependent types and enables safety without dynamic bounds checks. 1 Introduction Type-safe languages allow programmers to be more productive by eliminating such difficult-to-find errors as memory corruption. However, type safety comes at a cost in runtime performance due to the need for dynamic safety checks.
    [Show full text]
  • Runtime Defenses 1 Baggy Bounds Checking
    Runtime Defenses Nicholas Carlini 7 September, 2011 1 Baggy Bounds Checking 1.1 Motivation There are large amounts of legacy C programs which can not be rewritten entirely. Since memory must be manually managed in C, and bounds are not checked automatically on pointer dereferences, C often contains many memory-saftey bugs. One common type of bug is buffer overflows, where the length of an array is not checked before copying data in to the array: data is written past the end of the array and on top of whatever happens to be at that memory location. 1.2 Baggy Bounds Checking Baggy bounds checking was proposed as a possible defense which would detect when pointers wrote to a memory location out of bounds. It is a runtime defense, which uses source code instrumentation. At a very high level, baggy bounds checking keeps track of bounds information on allocated objects. When a pointer which indexes in to allocated memory is dereferenced, bounds checking code ensures that the pointer still is indexing the same allocated memory location. If the pointer points out of bounds of that object, the program is halted. Baggy bounds checking uses a buddy allocator to return objects of size 2n, and fills the remaining unused bytes with 0s. A bounds table is created containing the log of the sizes of every allocated object. Using this table allows for single-memory-access lookups, which is much more efficient than other methods which require multiple memory accesses. 1.3 Baggy Bounds Checking Failures Baggy bounds checking does not work in all situations, however.
    [Show full text]
  • Spring 2015 CS 161 Computer Security Optional Notes Memory
    CS 161 Optional Notes Spring 2015 Computer Security 1 Memory safety | Attacks and Defenses In the first few lectures we will be looking at software security|problems associated with the software implementation. You may have a perfect design, a perfect specification, perfect algorithms, but still have implementation vulnerabilities. In fact, after configuration errors, implementation errors are probably the largest single class of security errors exploited in practice. We will start by looking at a particularly prevalent class of software flaws, those that concern memory safety. Memory safety refers to ensuring the integrity of a program's data structures: preventing attackers from reading or writing to memory locations other than those intended by the programmer. Because many security-critical applications have been written in C, and because C has peculiar pitfalls of its own, many of these examples will be C-specific. Implementation flaws can in fact occur at all levels: in improper use of the programming language, the libraries, the operating system, or in the application logic. We will look at some of these others later in the course. 1 Buffer overflow vulnerabilities We'll start with one of the most common types of error|buffer overflow (also called buffer overrun) vulnerabilities. Buffer overflow vulnerabilities are a particular risk in C. Since it is an especially widely used systems programming language, you might not be surprised to hear that buffer overflows are one of the most pervasive kind of implementation flaws around. As a low-level language, we can think of C as a portable assembly language. The programmer is exposed to the bare machine (which is one reason that C is such a popular systems language).
    [Show full text]
  • Implicit Array Bounds Checking on 64-Bit Architectures
    Implicit Array Bounds Checking on 64-bit Architectures CHRIS BENTLEY, SCOTT A. WATTERSON, DAVID K. LOWENTHAL, and BARRY ROUNTREE The University of Georgia Several programming languages guarantee that array subscripts are checked to ensure they are within the bounds of the array. While this guarantee improves the correctness and security of array- based code, it adds overhead to array references. This has been an obstacle to using higher-level languages, such as Java, for high-performance parallel computing, where the language specification requires that all array accesses must be checked to ensure they are within bounds. This is because, in practice, array-bounds checking in scientific applications may increase execution time by more than a factor of 2. Previous research has explored optimizations to statically eliminate bounds checks, but the dynamic nature of many scientific codes makes this difficult or impossible. Our ap- proach is, instead, to create a compiler and operating system infrastructure that does not generate explicit bounds checks. It instead places arrays inside of Index Confinement Regions (ICRs), which are large, isolated, mostly unmapped virtual memory regions. Any array reference outside of its bounds will cause a protection violation; this provides implicit bounds checking. Our results show that when applying this infrastructure to high-performance computing programs written in Java, the overhead of bounds checking relative to a program with no bounds checks is reduced from an average of 63% to an average of 9%. Categories and Subject Descriptors: D.3.4 [Programming Languages]: Processors— Optimization General Terms: Measurement, Performance Additional Key Words and Phrases: Array-bounds checking, virtual memory, 64-bit architectures 1.
    [Show full text]
  • Ocaml Inside: a Drop-In Replacement for Libtls
    OCaml inside: a drop-in replacement for libtls Enguerrand Decorne (speaker), Jeremy Yallop, David Kaloper-Meršinjak University of Cambridge Computer Laboratory Introduction: openssl to libtls to libnqsb-tls case, these are declarations of the functions in the libtls inter- The C programming language pervades systems software. An op- face, which our library exports. The source files contain definitions erating system in the Unix tradition consists of a kernel, written of those functions, which mediate between the libtls interface in C, and a collection of libraries and executables, also written in and the ocaml-tls implementation, and which can be compiled C, which communicate in large part via APIs defined as C types and linked together with ocaml-tls, the OCaml runtime, and the and functions. Systems built in C typically suffer from a number of OCaml code that implements libnqsb-tls to build a shared li- problems, ranging from buffer overflows and other violations that brary. follow inevitably from unrestricted access to memory, to awkward let tls_server ()= APIs that result from an inexpressive type system and a lack of let tls_server= automatic memory management. { error= None; config= None; fd= None; The openssl library, which implements the cryptographic pro- state=‘NotConfigured; linger= None} in Root.create tls_server |> from_voidp tls tocols TLS and SSL, suffers from both these problems. The lack of bounds checking in C led to the notorious Heartbleed bug in let()=I.internal "tls_server" 2014; a study two years earlier found that almost no clients of (void @-> returning(ptr tls)) tls_server openssl use the library correctly, apparently due to its unhelpful interface (Georgiev et al.
    [Show full text]
  • A Comprehensive Approach to Array Bounds Check Elimination for Java
    A Comprehensive Approach to Array Bounds Check Elimination for Java Feng Qian, Laurie Hendren, and Clark Verbrugge School of Computer Science, McGill University {fqian,hendren,clump}@cs.mcgill.ca Abstract. This paper reports on a comprehensive approach to elimi- nating array bounds checks in Java. Our approach is based upon three analyses. The first analysis is a flow-sensitive intraprocedural analysis called variable constraint analysis (VCA). This analysis builds a small constraint graph for each important point in a method, and then uses the information encoded in the graph to infer the relationship between array index expressions and the bounds of the array. Using VCA as the base analysis, we also show how two further analyses can improve the results of VCA. Array field analysis is applied on each class and pro- vides information about some arrays stored in fields, while rectangular array analysis is an interprocedural analysis to approximate the shape of arrays, and is useful for finding rectangular (non-ragged) arrays. We have implemented all three analyses using the Soot bytecode opti- mization/annotation framework and we transmit the results of the anal- ysis to virtual machines using class file attributes. We have modified the Kaffe JIT, and IBM’s High Performance Compiler for Java (HPCJ) to make use of these attributes, and we demonstrate significant speedups. 1 Introduction The Java programming language is becoming increasingly popular for the im- plementation of a wide variety of application programs, including loop-intensive programs that use arrays. Java compilers translate high-level programs to Java bytecode and this bytecode is either executed by a Java virtual machine (usu- ally including a JIT compiler), or it is compiled by an ahead-of-time compiler to native code.
    [Show full text]
  • Backwards-Compatible Array Bounds Checking for C with Very Low Overhead∗
    Backwards-Compatible Array Bounds Checking for C with Very Low Overhead∗ Dinakar Dhurjati and Vikram Adve Department of Computer Science University of Illinois at Urbana-Champaign 201 N. Goodwin Ave., Urbana, IL 61801 {dhurjati,vadve}@cs.uiuc.edu ABSTRACT work on detecting array bounds violations or buffer over- The problem of enforcing correct usage of array and pointer runs, because the best existing solutions to date are either references in C and C++ programs remains unsolved. The far too expensive for use in deployed production code or approach proposed by Jones and Kelly (extended by Ruwase raise serious practical difficulties for use in real-world devel- and Lam) is the only one we know of that does not require opment situations. significant manual changes to programs, but it has extremely The fundamental difficulty of bounds checking in C and high overheads of 5x-6x and 11x–12x in the two versions. In C++ is the need to track, at run-time, the intended tar- this paper, we describe a collection of techniques that dra- get object of each pointer value (called the intended referent matically reduce the overhead of this approach, by exploit- by Jones and Kelly [10]). Unlike safe languages like Java, ing a fine-grain partitioning of memory called Automatic pointer arithmetic in C and C++ allows a pointer to be com- Pool Allocation. Together, these techniques bring the aver- puted into the middle of an array or string object and used age overhead checks down to only 12% for a set of bench- later to further index into the object.
    [Show full text]
  • Liquid Types ∗
    Liquid Types ∗ Patrick M. Rondon Ming Kawaguchi Ranjit Jhala University of California, San Diego {prondon,mwookawa,jhala}@cs.ucsd.edu Abstract The utility of these type systems stems from their ability to pre- We present Logically Qualified Data Types, abbreviated to Liquid dict, at compile-time, invariants about the run-time values com- Types, a system that combines Hindley-Milner type inference with puted by the program. Unfortunately, classical type systems only Predicate Abstraction to automatically infer dependent types pre- capture relatively coarse invariants. For example, the system can cise enough to prove a variety of safety properties. Liquid types express the fact that a variable i is of the type int, meaning that allow programmers to reap many of the benefits of dependent it is always an integer, but not that it is always an integer within a types, namely static verification of critical properties and the elim- certain range, say between 1 and 99. Thus, the type system is un- ination of expensive run-time checks, without the heavy price of able to statically ensure the safety of critical operations, such as a manual annotation. We have implemented liquid type inference in division by i, or the accessing of an array a of size 100 at an index i. Instead, the language can only provide a weaker dynamic safety DSOLVE, which takes as input an OCAML program and a set of log- ical qualifiers and infers dependent types for the expressions in the guarantee at the additional cost of high performance overhead. In an exciting development, several authors have proposed the OCAML program.
    [Show full text]
  • Coverity Support for SEI CERT C, C++, and Java Coding Standards
    Coverity Support for SEI CERT C, C++, and Java Coding Standards Ensure the safety, The SEI CERT C, C++, and Oracle Java Coding Standards are lists of rules and reliability, and security recommendations for writing secure code in the C, C++, and Java programming languages They represent an important milestone in introducing best practices for of software written in C, ensuring the safety, reliability, security, and integrity of software written in C/C++ and C++, and Java Java Notably, the standards are designed to be enforceable by software code analyzers using static analysis techniques This greatly reduces the cost of compliance by way of automation Adhering to coding standards is a crucial step in establishing best coding practices Standards adherence is particularly important in safety-critical, high-impact industries, such as automotive, medical, and networking Software defects in products coming from these industries manifest themselves physically and tangibly—often with life- threatening consequences Synopsys provides a comprehensive solution for the SEI CERT C/C++ Coding Standards rules, along with high-impact SEI CERT Oracle Java Coding Standards (online version) rules and SEI CERT C Coding Standard recommendations (online version) Coverity static analysis implements the Rules category within the CERT C/ C++ standards, high-impact CERT Java L1 rules, and methods for managing violations and reporting on them Coverity also supports some of the best practices from the Recommendations category for the CERT C standard Acknowledgement
    [Show full text]
  • Checking Array Bounds by Abstract Interpretation and Symbolic Expressionsétienne Fausto Spoto, Etienne Payet
    Checking Array Bounds by Abstract Interpretation and Symbolic ExpressionsÉtienne Fausto Spoto, Etienne Payet To cite this version: Fausto Spoto, Etienne Payet. Checking Array Bounds by Abstract Interpretation and Symbolic Ex- pressionsÉtienne. 9th International Joint Conference on Automated Reasoning (IJCAR’18), Jul 2018, Oxford, United Kingdom. pp.706-722, 10.1007/978-3-319-94205-6_46. hal-01921666 HAL Id: hal-01921666 https://hal.univ-reunion.fr/hal-01921666 Submitted on 14 Nov 2018 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Checking Array Bounds by Abstract Interpretation and Symbolic Expressions Etienne´ Payet1 and Fausto Spoto2 1 Laboratoire d'Informatique et de Math´ematiques, Universit´ede la R´eunion,France 2 Dipartimento di Informatica, Universit`adi Verona, Italy Abstract. Array access out of bounds is a typical programming er- ror. From the '70s, static analysis has been used to identify where such errors actually occur at runtime, through abstract interpretation into linear constraints. However, feasibility and scalability to modern object- oriented code has not been established yet. This article builds on previ- ous work on linear constraints and shows that the result does not scale, when polyhedra implement the linear constraints, while the more ab- stract zones scale to the analysis of medium-size applications.
    [Show full text]