Static Deadlock Detection for Rust Programs
- URL: http://arxiv.org/abs/2401.01114v1
- Date: Tue, 2 Jan 2024 09:09:48 GMT
- Title: Static Deadlock Detection for Rust Programs
- Authors: Yu Zhang, Kaiwen Zhang, Guanjun Liu
- Abstract summary: Rust relies on its unique ownership mechanism to ensure thread and memory safety.
New language features in Rust pose new challenges for vulnerability detection.
This paper proposes a static deadlock detection method tailored for Rust programs.
- Score: 6.596623081054982
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Rust relies on its unique ownership mechanism to ensure thread and memory
safety. However, numerous potential security vulnerabilities persist in
practical applications. New language features in Rust pose new challenges for
vulnerability detection. This paper proposes a static deadlock detection method
tailored for Rust programs, aiming to identify various deadlock types,
including double lock, conflict lock, and deadlock associated with conditional
variables. With due consideration for Rust's ownership and lifetimes, we first
complete the pointer analysis. Then, based on the obtained points-to
information, we analyze dependencies among variables to identify potential
deadlocks. We develop a tool and conduct experiments based on the proposed
method. The experimental results demonstrate that our method outperforms
existing deadlock detection methods in precision.
Related papers
- Uncertainty is Fragile: Manipulating Uncertainty in Large Language Models [79.76293901420146]
Large Language Models (LLMs) are employed across various high-stakes domains, where the reliability of their outputs is crucial.
Our research investigates the fragility of uncertainty estimation and explores potential attacks.
We demonstrate that an attacker can embed a backdoor in LLMs, which, when activated by a specific trigger in the input, manipulates the model's uncertainty without affecting the final output.
arXiv Detail & Related papers (2024-07-15T23:41:11Z) - Rigorous Probabilistic Guarantees for Robust Counterfactual Explanations [80.86128012438834]
We show for the first time that computing the robustness of counterfactuals with respect to plausible model shifts is NP-complete.
We propose a novel probabilistic approach which is able to provide tight estimates of robustness with strong guarantees.
arXiv Detail & Related papers (2024-07-10T09:13:11Z) - Characterizing Unsafe Code Encapsulation In Real-world Rust Systems [2.285834282327349]
Interior unsafe is an essential design paradigm advocated by the Rust community in system software development.
The Rust compiler is incapable of verifying the soundness of a safe function containing unsafe code.
We propose a novel unsafety isolation graph to model the essential usage and encapsulation of unsafe code.
arXiv Detail & Related papers (2024-06-12T06:59:51Z) - A Study of Undefined Behavior Across Foreign Function Boundaries in Rust Libraries [2.359557447960552]
Rust is frequently used to interoperate with other languages.
Miri is the only dynamic analysis tool capable of validating applications against these models.
Miri does not support foreign functions, indicating that there may be a critical correctness gap at the heart of the Rust ecosystem.
arXiv Detail & Related papers (2024-04-17T18:12:05Z) - Navigating the OverKill in Large Language Models [84.62340510027042]
We investigate the factors for overkill by exploring how models handle and determine the safety of queries.
Our findings reveal the presence of shortcuts within models, leading to an over-attention of harmful words like 'kill' and prompts emphasizing safety will exacerbate overkill.
We introduce Self-Contrastive Decoding (Self-CD), a training-free and model-agnostic strategy, to alleviate this phenomenon.
arXiv Detail & Related papers (2024-01-31T07:26:47Z) - Fast Summary-based Whole-program Analysis to Identify Unsafe Memory Accesses in Rust [23.0568924498396]
Rust is one of the most promising systems programming languages to solve the memory safety issues that have plagued low-level software for over forty years.
unsafe Rust code and directly-linked unsafe foreign libraries may not only introduce memory safety violations themselves but also compromise the entire program as they run in the same monolithic address space as the safe Rust.
We have prototyped a whole-program analysis for identifying both unsafe heap allocations and memory accesses to those unsafe heap objects.
arXiv Detail & Related papers (2023-10-16T11:34:21Z) - Yuga: Automatically Detecting Lifetime Annotation Bugs in the Rust Language [15.164423552903571]
Security vulnerabilities have been reported in Rust projects, often attributed to the use of "unsafe" Rust code.
These vulnerabilities, in part, arise from incorrect lifetime annotations on function signatures.
Existing tools fail to detect these bugs, primarily because such bugs are rare, challenging to detect through dynamic analysis.
We devise a novel static analysis tool, Yuga, to detect potential lifetime annotation bugs.
arXiv Detail & Related papers (2023-10-12T17:05:03Z) - A Closer Look at the Security Risks in the Rust Ecosystem [0.0]
Rust is an emerging programming language designed for the development of systems software.
To facilitate the reuse of Rust code, crates.io, as a central package registry of the Rust ecosystem, hosts thousands of third-party Rust packages.
The openness of crates.io enables the growth of the Rust ecosystem but comes with security risks by severe security advisories.
arXiv Detail & Related papers (2023-08-29T06:05:25Z) - Beyond the Prior Forgery Knowledge: Mining Critical Clues for General
Face Forgery Detection [61.74632676703288]
We propose a novel Critical Forgery Mining framework, which can be flexibly assembled with various backbones to boost generalization and performance.
Specifically, we first build a fine-grained triplet and suppress specific forgery traces through prior knowledge-agnostic data augmentation.
We then propose a fine-grained relation learning prototype to mine critical information in forgeries through instance and local similarity-aware losses.
arXiv Detail & Related papers (2023-04-24T23:02:27Z) - Benefits of Monotonicity in Safe Exploration with Gaussian Processes [50.71125084216603]
We consider the problem of sequentially maximising an unknown function over a set of actions.
We show that textscsffamily M-SafeUCB enjoys theoretical guarantees in terms of safety, a suitably-defined regret notion, and approximately finding the entire safe boundary.
arXiv Detail & Related papers (2022-11-03T02:52:30Z) - Detection as Regression: Certified Object Detection by Median Smoothing [50.89591634725045]
This work is motivated by recent progress on certified classification by randomized smoothing.
We obtain the first model-agnostic, training-free, and certified defense for object detection against $ell$-bounded attacks.
arXiv Detail & Related papers (2020-07-07T18:40:19Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.