Skip to content

Commit 92217bb

Browse files
committed
Auto merge of rust-lang#3032 - RalfJung:serde, r=RalfJung,oli-obk
pin a version of serde without intransparent unreproducible binary blobs Serde is [shipping a binary blob in its derive crate](serde-rs/serde#2538), which is highly unexpected and subverts user trust. To make matters worse, the binary is [not even reproducible](serde-rs/serde#2575), making the crate largely unauditable and relinquishing the security benefits of open-source software. Build times are not nearly painful enough to justify forcing users to trust binary blobs.
2 parents 23b9d95 + 44fa4cd commit 92217bb

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

src/tools/miri/Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ dependencies = [
443443
"rand",
444444
"regex",
445445
"rustc_version",
446+
"serde",
446447
"smallvec",
447448
"ui_test",
448449
]

src/tools/miri/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ rustc_version = "0.4"
4141
# Features chosen to match those required by env_logger, to avoid rebuilds
4242
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
4343
lazy_static = "1.4.0"
44+
# Pin a version of serde without intransparent unreproducible binary blobs.
45+
serde = { version = "1.0, < 1.0.172", features = ["derive"] }
4446

4547
[package.metadata.rust-analyzer]
4648
# This crate uses #[feature(rustc_private)].

src/tools/miri/cargo-miri/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ rustc-build-sysroot = "0.4.1"
2222

2323
# Enable some feature flags that dev-dependencies need but dependencies
2424
# do not. This makes `./miri install` after `./miri build` faster.
25-
serde = { version = "*", features = ["derive"] }
25+
# Pin a version of serde without intransparent unreproducible binary blobs.
26+
serde = { version = "1.0, < 1.0.172", features = ["derive"] }
2627

2728
[build-dependencies]
2829
rustc_tools_util = "0.3"

src/tools/miri/test-cargo-miri/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ issue_rust_86261 = { path = "issue-rust-86261" }
2020

2121
[dev-dependencies]
2222
byteorder_2 = { package = "byteorder", version = "0.5" } # to test dev-dependencies behave as expected, with renaming
23-
serde_derive = "1.0" # not actually used, but exercises some unique code path (`--extern` .so file)
23+
# Not actually used, but exercises some unique code path (`--extern` .so file).
24+
# Pin a version without intransparent unreproducible binary blobs.
25+
serde_derive = "=1.0.152"
2426

2527
[build-dependencies]
2628
autocfg = "1"

0 commit comments

Comments
 (0)