Skip to content

Commit f707856

Browse files
celinvaltedinski
authored andcommitted
Vecdeque CVE demo (rust-lang#971)
* Add harness to VecDeque CVE
1 parent 593b2b0 commit f707856

9 files changed

+1796
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0 OR MIT
3+
[package]
4+
name = "vecdeque-cve"
5+
version = "0.1.0"
6+
edition = "2018"
7+
description = "Reproduces CVE-2018-1000657"
8+
9+
[lib]
10+
path = "src/harness.rs"
11+
12+
[dependencies]
13+
14+
[package.metadata.kani.flags]
15+
cbmc-args = ["--no-built-in-assertions"]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
fixed::VecDeque::<T, A>::handle_capacity_increase.assertion.14\
2+
Status: UNREACHABLE\
3+
Description: "assertion failed: self.head < self.tail"
4+
5+
fixed::VecDeque::<T, A>::handle_capacity_increase.assertion.16\
6+
Status: UNREACHABLE\
7+
Description: "assertion failed: self.head < self.cap()"
8+
9+
fixed::VecDeque::<T, A>::handle_capacity_increase.assertion.18\
10+
Status: UNREACHABLE\
11+
Description: "assertion failed: self.tail < self.cap()"
12+
13+
fixed::VecDeque::<T, A>::handle_capacity_increase.assertion.20\
14+
Status: UNREACHABLE\
15+
Description: "assertion failed: self.cap().count_ones() == 1"
16+
17+
VERIFICATION:- SUCCESSFUL
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cve::VecDeque::<T, A>::handle_capacity_increase.assertion\
2+
- Status: FAILURE\
3+
- Description: "assertion failed: self.head < self.cap()"
4+
Location: src/cve.rs
5+
6+
Failed Checks: assertion failed: self.head < self.cap()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cve::VecDeque::<T, A>::handle_capacity_increase.assertion\
2+
Status: SUCCESS\
3+
Description: "assertion failed: self.head < self.cap()"\
4+
Location: src/cve.rs
5+
6+
cve::VecDeque::<T, A>::handle_capacity_increase.assertion\
7+
Status: SUCCESS\
8+
Description: "assertion failed: self.tail < self.cap()"\
9+
Location: src/cve.rs
10+
11+
cve::VecDeque::<T, A>::handle_capacity_increase.assertion\
12+
Status: SUCCESS\
13+
Description: "assertion failed: self.cap().count_ones() == 1"\
14+
Location: src/cve.rs
15+
16+
VERIFICATION:- SUCCESSFUL
17+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
fixed::VecDeque::<T, A>::handle_capacity_increase.assertion\
2+
Status: SUCCESS\
3+
Description: "assertion failed: self.head < self.cap()"\
4+
Location: src/fixed.rs
5+
6+
fixed::VecDeque::<T, A>::handle_capacity_increase.assertion\
7+
Status: SUCCESS\
8+
Description: "assertion failed: self.tail < self.cap()"\
9+
Location: src/fixed.rs
10+
11+
fixed::VecDeque::<T, A>::handle_capacity_increase.assertion\
12+
Status: SUCCESS\
13+
Description: "assertion failed: self.cap().count_ones() == 1"\
14+
Location: src/fixed.rs
15+
16+
VERIFICATION:- SUCCESSFUL
17+

0 commit comments

Comments
 (0)