Skip to content

Commit ac125ee

Browse files
authored
Translate database into V3 advisory format (#420)
As proposed in #240 and tracked in #414, this PR translates all advisories into the new "V3" advisory format, which is based on Markdown with leading TOML front matter. This format makes it easier to see rendered Markdown syntax descriptions, whether rendered by an IDE or GitHub. This should help with both crafting advisories initially as well as review, and ideally encourages more lengthy descriptions. Support for this format shipped in `cargo-audit` v0.12.0 on May 6th, 2020.
1 parent 2770460 commit ac125ee

File tree

127 files changed

+1291
-1059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+1291
-1059
lines changed

.github/workflows/validate.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
uses: actions/cache@v1
1717
with:
1818
path: ~/.cargo/bin
19-
key: rustsec-admin-v0.2.0
19+
key: rustsec-admin-v0.3.0-pre
2020

2121
- name: Install rustsec-admin
2222
run: |
2323
if [ ! -f $HOME/.cargo/bin/rustsec-admin ]; then
24-
cargo install rustsec-admin
24+
cargo install rustsec-admin --vers 0.3.0-pre
2525
fi
2626
2727
- name: Lint advisories

crates/actix-codec/RUSTSEC-2020-0049.toml renamed to crates/actix-codec/RUSTSEC-2020-0049.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0049"
34
package = "actix-codec"
5+
categories = ["memory-corruption"]
46
date = "2020-01-30"
5-
title = "Use-after-free in Framed due to lack of pinning"
67
url = "https://github.com/actix/actix-net/issues/91"
7-
categories = ["memory-corruption"]
88

9-
description = """
9+
[versions]
10+
patched = [">= 0.3.0-beta.1"]
11+
```
12+
13+
# Use-after-free in Framed due to lack of pinning
14+
1015
Affected versions of this crate did not require the buffer wrapped in `Framed` to be pinned,
1116
but treated it as if it had a fixed location in memory. This may result in a use-after-free.
1217

1318
The flaw was corrected by making the affected functions accept `Pin<&mut Self>` instead of `&mut self`.
14-
"""
15-
16-
[versions]
17-
patched = [">= 0.3.0-beta.1"]
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0048"
34
package = "actix-http"
5+
categories = ["memory-corruption"]
46
date = "2020-01-24"
5-
title = "Use-after-free in BodyStream due to lack of pinning"
67
url = "https://github.com/actix/actix-web/issues/1321"
7-
categories = ["memory-corruption"]
88

9-
description = """
9+
[versions]
10+
patched = [">= 2.0.0-alpha.1"]
11+
```
12+
13+
# Use-after-free in BodyStream due to lack of pinning
14+
1015
Affected versions of this crate did not require the buffer wrapped in `BodyStream` to be pinned,
1116
but treated it as if it had a fixed location in memory. This may result in a use-after-free.
1217

1318
The flaw was corrected by making the trait `MessageBody` require `Unpin`
1419
and making `poll_next()` function accept `Pin<&mut Self>` instead of `&mut self`.
15-
"""
16-
17-
# Versions which include fixes for this vulnerability (mandatory)
18-
[versions]
19-
patched = [">= 2.0.0-alpha.1"]
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0046"
34
package = "actix-service"
4-
date = "2020-01-08"
5-
6-
title = "bespoke Cell implementation allows obtaining several mutable references to the same data"
7-
url = "https://github.com/actix/actix-net/pull/158"
85
categories = ["memory-corruption"]
6+
date = "2020-01-08"
97
informational = "unsound"
8+
url = "https://github.com/actix/actix-net/pull/158"
9+
10+
[versions]
11+
patched = [">= 1.0.6"]
12+
```
13+
14+
# bespoke Cell implementation allows obtaining several mutable references to the same data
1015

11-
description = """
1216
The custom implementation of a Cell primitive in the affected versions of this crate
1317
does not keep track of mutable references to the underlying data.
1418

1519
This allows obtaining several mutable references to the same object
1620
which may result in arbitrary memory corruption, most likely use-after-free.
1721

1822
The flaw was corrected by switching from a bespoke `Cell<T>` implementation to `Rc<RefCell<T>>`.
19-
"""
20-
21-
[versions]
22-
patched = [">= 1.0.6"]
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0045"
34
package = "actix-utils"
4-
date = "2020-01-08"
5-
6-
title = "bespoke Cell implementation allows obtaining several mutable references to the same data"
7-
url = "https://github.com/actix/actix-net/issues/160"
85
categories = ["memory-corruption"]
6+
date = "2020-01-08"
97
informational = "unsound"
8+
url = "https://github.com/actix/actix-net/issues/160"
9+
10+
[versions]
11+
patched = [">= 2.0.0"]
12+
```
13+
14+
# bespoke Cell implementation allows obtaining several mutable references to the same data
1015

11-
description = """
1216
The custom implementation of a Cell primitive in the affected versions of this crate
1317
does not keep track of mutable references to the underlying data.
1418

1519
This allows obtaining several mutable references to the same object
1620
which may result in arbitrary memory corruption, most likely use-after-free.
1721

1822
The flaw was corrected by switching from a bespoke `Cell<T>` implementation to `Rc<RefCell<T>>`.
19-
"""
20-
21-
[versions]
22-
patched = [">= 2.0.0"]

crates/actix-web/RUSTSEC-2018-0019.toml renamed to crates/actix-web/RUSTSEC-2018-0019.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2018-0019"
34
package = "actix-web"
5+
categories = ["memory-corruption"]
46
date = "2018-06-08"
5-
title = "Multiple memory safety issues"
67
url = "https://github.com/actix/actix-web/issues/289"
7-
categories = ["memory-corruption"]
8-
description = """
8+
9+
[versions]
10+
patched = [">= 0.7.15"]
11+
```
12+
13+
# Multiple memory safety issues
14+
915
Affected versions contain multiple memory safety issues, such as:
1016

1117
- Unsoundly coercing immutable references to mutable references
@@ -15,7 +21,3 @@ Affected versions contain multiple memory safety issues, such as:
1521
This may result in a variety of memory corruption scenarios, most likely use-after-free.
1622

1723
A signficant refactoring effort has been conducted to resolve these issues.
18-
"""
19-
20-
[versions]
21-
patched = [">= 0.7.15"]
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0033"
34
package = "alg_ds"
45
date = "2020-08-25"
5-
title = "Matrix::new() drops uninitialized memory"
66
url = "https://gitlab.com/dvshapkin/alg-ds/-/issues/1"
7-
description = """
8-
`Matrix::new()` internally calls `Matrix::fill_with()` which uses `*ptr = value` pattern to initialize the buffer.
9-
This pattern assumes that there is an initialized struct at the address and drops it, which results in dropping of uninitialized struct.
10-
"""
117

128
[versions]
139
patched = []
10+
```
11+
12+
# Matrix::new() drops uninitialized memory
13+
14+
`Matrix::new()` internally calls `Matrix::fill_with()` which uses `*ptr = value` pattern to initialize the buffer.
15+
This pattern assumes that there is an initialized struct at the address and drops it, which results in dropping of uninitialized struct.
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0032"
34
package = "alpm-rs"
45
date = "2020-08-20"
56
informational = "unsound"
6-
title = "StrcCtx deallocates a memory region that it doesn't own"
77
url = "https://github.com/pigeonhands/rust-arch/issues/2"
8-
description = """
9-
`StrcCtx` deallocate a memory region that it doesn't own when `StrcCtx` is created without using `StrcCtx::new`.
10-
This can introduce memory safety issues such as double-free and use-after-free to client programs.
11-
"""
128

139
[versions]
1410
patched = []
11+
```
12+
13+
# StrcCtx deallocates a memory region that it doesn't own
14+
15+
`StrcCtx` deallocate a memory region that it doesn't own when `StrcCtx` is created without using `StrcCtx::new`.
16+
This can introduce memory safety issues such as double-free and use-after-free to client programs.
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2019-0001"
34
package = "ammonia"
5+
aliases = ["CVE-2019-15542"]
46
date = "2019-04-27"
5-
title = "Uncontrolled recursion leads to abort in HTML serialization"
6-
url = "https://github.com/rust-ammonia/ammonia/blob/master/CHANGELOG.md#210"
77
keywords = ["stack-overflow", "crash"]
8-
description = """
9-
Affected versions of this crate did use recursion for serialization of HTML
10-
DOM trees.
11-
12-
This allows an attacker to cause abort due to stack overflow by providing
13-
a pathologically nested input.
14-
15-
The flaw was corrected by serializing the DOM tree iteratively instead.
16-
"""
17-
aliases = ["CVE-2019-15542"]
8+
url = "https://github.com/rust-ammonia/ammonia/blob/master/CHANGELOG.md#210"
189

1910
[affected.functions]
20-
"ammonia::clean" = ["< 2.1.0"]
2111
"ammonia::Document::to_string" = ["< 2.1.0"]
2212
"ammonia::Document::write_to" = ["< 2.1.0"]
13+
"ammonia::clean" = ["< 2.1.0"]
2314

2415
[versions]
2516
patched = [">= 2.1.0"]
17+
```
18+
19+
# Uncontrolled recursion leads to abort in HTML serialization
20+
21+
Affected versions of this crate did use recursion for serialization of HTML
22+
DOM trees.
23+
24+
This allows an attacker to cause abort due to stack overflow by providing
25+
a pathologically nested input.
26+
27+
The flaw was corrected by serializing the DOM tree iteratively instead.

crates/arr/RUSTSEC-2020-0034.toml renamed to crates/arr/RUSTSEC-2020-0034.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0034"
34
package = "arr"
45
date = "2020-08-25"
5-
title = "Multiple security issues including data race, buffer overflow, and uninitialized memory drop"
66
url = "https://github.com/sjep/array/issues/1"
7-
description = """
7+
8+
[versions]
9+
patched = []
10+
```
11+
12+
# Multiple security issues including data race, buffer overflow, and uninitialized memory drop
13+
814
`arr` crate contains multiple security issues. Specifically,
915

1016
1. It incorrectly implements Sync/Send bounds, which allows to smuggle non-Sync/Send types across the thread boundary.
1117
2. `Index` and `IndexMut` implementation does not check the array bound.
1218
3. `Array::new_from_template()` drops uninitialized memory.
13-
"""
14-
15-
[versions]
16-
patched = []
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0047"
34
package = "array-queue"
45
date = "2020-09-26"
5-
title = "array_queue pop_back() may cause a use-after-free"
6-
url = "https://github.com/raviqqe/array-queue/issues/2"
7-
description = """
8-
array_queue implements a circular queue that wraps around an array. However, it
9-
fails to properly index into the array in the `pop_back` function allowing the
10-
reading of previously dropped or uninitialized memory.
11-
"""
126
keywords = ["memory-corruption", "uninitialized-memory", "use-after-free"]
7+
url = "https://github.com/raviqqe/array-queue/issues/2"
138

149
[versions]
15-
1610
patched = []
1711
unaffected = ["< 0.3.0"]
12+
```
13+
14+
# array_queue pop_back() may cause a use-after-free
15+
16+
array_queue implements a circular queue that wraps around an array. However, it
17+
fails to properly index into the array in the `pop_back` function allowing the
18+
reading of previously dropped or uninitialized memory.

crates/arrayfire/RUSTSEC-2018-0011.toml renamed to crates/arrayfire/RUSTSEC-2018-0011.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2018-0011"
34
package = "arrayfire"
4-
date = "2018-12-18"
5-
title = "Enum repr causing potential memory corruption"
6-
url = "https://github.com/arrayfire/arrayfire-rust/pull/177"
5+
aliases = ["CVE-2018-20998"]
76
categories = ["memory-corruption"]
7+
date = "2018-12-18"
88
keywords = ["enum", "repr"]
9-
description = """
9+
url = "https://github.com/arrayfire/arrayfire-rust/pull/177"
10+
11+
[affected]
12+
arch = ["x86_64"]
13+
os = ["windows"]
14+
15+
[versions]
16+
patched = [">= 3.6.0"]
17+
unaffected = ["<= 3.5.0"]
18+
```
19+
20+
# Enum repr causing potential memory corruption
21+
1022
The attribute repr() added to enums to be compatible with C-FFI caused
1123
memory corruption on MSVC toolchain.
1224

@@ -17,13 +29,3 @@ Rust version 1.28.
1729
The issue seems to be interlinked with which version of Rust is being used.
1830

1931
The issue was fixed in crate 3.6.0.
20-
"""
21-
aliases = ["CVE-2018-20998"]
22-
23-
[versions]
24-
patched = [">= 3.6.0"]
25-
unaffected = ["<= 3.5.0"]
26-
27-
[affected]
28-
arch = ["x86_64"]
29-
os = ["windows"]

crates/asn1_der/RUSTSEC-2019-0007.toml renamed to crates/asn1_der/RUSTSEC-2019-0007.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2019-0007"
34
package = "asn1_der"
5+
aliases = ["CVE-2019-15549"]
46
date = "2019-06-13"
5-
title = "Processing of maliciously crafted length fields causes memory allocation SIGABRTs"
6-
url = "https://github.com/KizzyCode/asn1_der/issues/1"
77
keywords = ["dos"]
8-
description = """
8+
url = "https://github.com/KizzyCode/asn1_der/issues/1"
9+
10+
[versions]
11+
patched = [">= 0.6.2"]
12+
```
13+
14+
# Processing of maliciously crafted length fields causes memory allocation SIGABRTs
15+
916
Affected versions of this crate tried to preallocate a vector for an arbitrary amount of bytes announced by the ASN.1-DER length field without further checks.
1017

1118
This allows an attacker to trigger a SIGABRT by creating length fields that announce more bytes than the allocator can provide.
1219

1320
The flaw was corrected by not preallocating memory.
14-
"""
15-
aliases = ["CVE-2019-15549"]
16-
17-
[versions]
18-
patched = [">= 0.6.2"]
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1+
```toml
12
[advisory]
23
id = "RUSTSEC-2020-0044"
34
package = "atom"
45
date = "2020-09-21"
56
informational = "unsound"
6-
title = "Unsafe Send implementation in Atom allows data races"
77
url = "https://github.com/slide-rs/atom/issues/13"
8-
description = """
9-
The `atom` crate contains a security issue revolving around its implementation
10-
of the Send trait. It incorrectly allows any arbitrary type to be sent across
11-
threads potentially leading to use-after-free issues through memory races.
12-
"""
138

149
[versions]
1510
patched = []
11+
```
12+
13+
# Unsafe Send implementation in Atom allows data races
14+
15+
The `atom` crate contains a security issue revolving around its implementation
16+
of the Send trait. It incorrectly allows any arbitrary type to be sent across
17+
threads potentially leading to use-after-free issues through memory races.

0 commit comments

Comments
 (0)