memory safety
Recently Published Documents


TOTAL DOCUMENTS

86
(FIVE YEARS 34)

H-INDEX

11
(FIVE YEARS 2)

2022 ◽  
Vol 31 (1) ◽  
pp. 1-25
Author(s):  
Hui Xu ◽  
Zhuangbin Chen ◽  
Mingshen Sun ◽  
Yangfan Zhou ◽  
Michael R. Lyu

Rust is an emerging programming language that aims at preventing memory-safety bugs without sacrificing much efficiency. The claimed property is very attractive to developers, and many projects start using the language. However, can Rust achieve the memory-safety promise? This article studies the question by surveying 186 real-world bug reports collected from several origins, which contain all existing Rust common vulnerability and exposures (CVEs) of memory-safety issues by 2020-12-31. We manually analyze each bug and extract their culprit patterns. Our analysis result shows that Rust can keep its promise that all memory-safety bugs require unsafe code, and many memory-safety bugs in our dataset are mild soundness issues that only leave a possibility to write memory-safety bugs without unsafe code. Furthermore, we summarize three typical categories of memory-safety bugs, including automatic memory reclaim, unsound function, and unsound generic or trait. While automatic memory claim bugs are related to the side effect of Rust newly-adopted ownership-based resource management scheme, unsound function reveals the essential challenge of Rust development for avoiding unsound code, and unsound generic or trait intensifies the risk of introducing unsoundness. Based on these findings, we propose two promising directions toward improving the security of Rust development, including several best practices of using specific APIs and methods to detect particular bugs involving unsafe code. Our work intends to raise more discussions regarding the memory-safety issues of Rust and facilitate the maturity of the language.


2022 ◽  
Vol 6 (POPL) ◽  
pp. 1-29
Author(s):  
Azalea Raad ◽  
Josh Berdine ◽  
Derek Dreyer ◽  
Peter W. O'Hearn

Incorrectness separation logic (ISL) was recently introduced as a theory of under-approximate reasoning, with the goal of proving that compositional bug catchers find actual bugs. However, ISL only considers sequential programs. Here, we develop concurrent incorrectness separation logic (CISL), which extends ISL to account for bug catching in concurrent programs. Inspired by the work on Views, we design CISL as a parametric framework, which can be instantiated for a number of bug catching scenarios, including race detection, deadlock detection, and memory safety error detection. For each instance, the CISL meta-theory ensures the soundness of incorrectness reasoning for free, thereby guaranteeing that the bugs detected are true positives.


Author(s):  
Xiaohua Yin ◽  
Zhiqiu Huang ◽  
Shuanglong Kan ◽  
Guohua Shen ◽  
Zhe Chen ◽  
...  

2021 ◽  
Author(s):  
Hsu-Kang Dow ◽  
Tuo Li ◽  
William Miles ◽  
Sri Parameswaran
Keyword(s):  

2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-29
Author(s):  
Paul He ◽  
Eddy Westbrook ◽  
Brent Carmer ◽  
Chris Phifer ◽  
Valentin Robert ◽  
...  

Verifying imperative programs is hard. A key difficulty is that the specification of what an imperative program does is often intertwined with details about pointers and imperative state. Although there are a number of powerful separation logics that allow the details of imperative state to be captured and managed, these details are complicated and reasoning about them requires significant time and expertise. In this paper, we take a different approach: a memory-safe type system that, as part of type-checking, extracts functional specifications from imperative programs. This disentangles imperative state, which is handled by the type system, from functional specifications, which can be verified without reference to pointers. A key difficulty is that sometimes memory safety depends crucially on the functional specification of a program; e.g., an array index is only memory-safe if the index is in bounds. To handle this case, our specification extraction inserts dynamic checks into the specification. Verification then requires the additional proof that none of these checks fail. However, these checks are in a purely functional language, and so this proof also requires no reasoning about pointers.


2021 ◽  
Author(s):  
Andrea Mambretti ◽  
Alexandra Sandulescu ◽  
Alessandro Sorniotti ◽  
William Robertson ◽  
Engin Kirda ◽  
...  
Keyword(s):  

2021 ◽  
Author(s):  
Ahmed Bhayat ◽  
Lucas Cordeiro ◽  
Giles Reger ◽  
Fedor Shmarov ◽  
Konstantin Korovin ◽  
...  

Memory corruption bugs continue to plague low-level systems software generally written in unsafe programming languages. In order to detect and protect against such exploits, many pre- and post-deployment techniques exist. In this position paper, we propose and motivate the need for a <i>hybrid</i> approach for the protection against memory safety vulnerabilities, combining techniques that can identify the presence (and absence) of vulnerabilities pre-deployment with those that can detect and mitigate such vulnerabilities post-deployment. Our hybrid approach involves three layers: hardware runtime protection provided by capability hardware, software runtime protection provided by compiler instrumentation, and static analysis provided by bounded model checking and symbolic execution. The key aspect of the proposed hybrid approach is that the protection offered is greater than the sum of its parts -- the expense of post-deployment runtime checks is reduced via information obtained during pre-deployment analysis. During pre-deployment analysis, static checking can be guided by runtime information. <br>


2021 ◽  
Vol 18 (4) ◽  
pp. 1-27
Author(s):  
Tina Jung ◽  
Fabian Ritter ◽  
Sebastian Hack

Memory safety violations such as buffer overflows are a threat to security to this day. A common solution to ensure memory safety for C is code instrumentation. However, this often causes high execution-time overhead and is therefore rarely used in production. Static analyses can reduce this overhead by proving some memory accesses in bounds at compile time. In practice, however, static analyses may fail to verify in-bounds accesses due to over-approximation. Therefore, it is important to additionally optimize the checks that reside in the program. In this article, we present PICO, an approach to eliminate and replace in-bounds checks. PICO exactly captures the spatial memory safety of accesses using Presburger formulas to either verify them statically or substitute existing checks with more efficient ones. Thereby, PICO can generate checks of which each covers multiple accesses and place them at infrequently executed locations. We evaluate our LLVM-based PICO prototype with the well-known SoftBound instrumentation on SPEC benchmarks commonly used in related work. PICO reduces the execution-time overhead introduced by SoftBound by 36% on average (and the code-size overhead by 24%). Our evaluation shows that the impact of substituting checks dominates that of removing provably redundant checks.


Sign in / Sign up

Export Citation Format

Share Document