Skip to content

Do not dereference pointer in fmt::Pointer#1276

Merged
taiki-e merged 1 commit into
mainfrom
epoch-ptr-fmt
Jul 6, 2026
Merged

Do not dereference pointer in fmt::Pointer#1276
taiki-e merged 1 commit into
mainfrom
epoch-ptr-fmt

Conversation

@taiki-e

@taiki-e taiki-e commented Jul 6, 2026

Copy link
Copy Markdown
Member

Follow-up to #1273.

When I wrote that PR, I thought it was sound because unsafe code was required to create a non-null invalid pointer, but in reality, calling fmt::Display on a shared object loaded in relaxed order is still unsound even if the pointer is valid (in this specific case, due to address dependency, the old data shouldn't be readable on arches other than alpha which is not supported in Rust).

See also the description of rustsec/advisory-db#3042.

@taiki-e
taiki-e merged commit 91665e3 into main Jul 6, 2026
29 checks passed
@taiki-e
taiki-e deleted the epoch-ptr-fmt branch July 6, 2026 17:34
This was referenced Jul 7, 2026
This was referenced Jul 7, 2026
J-Mentiora pushed a commit to mentiora-ai/loom that referenced this pull request Jul 14, 2026
Clears the cargo-deny advisory failure that has been red on main: invalid
pointer dereference in the `fmt::Pointer` impl for `Atomic`/`Shared`
(crossbeam-rs/crossbeam#1276). Transitive via crossbeam-deque, so this is a
lockfile-only bump — no manifest change, no new crates.

`cargo deny check advisories` now reports "advisories ok".

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
J-Mentiora added a commit to mentiora-ai/loom that referenced this pull request Jul 14, 2026
…265)

Clears the cargo-deny advisory that has been red on main: invalid pointer
dereference in the `fmt::Pointer` impl for `Atomic`/`Shared`
(crossbeam-rs/crossbeam#1276). Transitive via crossbeam-deque, so this is a
lockfile-only bump — no manifest change, no new crates.

`cargo deny check advisories` reports "advisories ok" locally.

Co-authored-by: Mentiora <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
JonathanBrouwer pushed a commit to JonathanBrouwer/rust that referenced this pull request Jul 19, 2026
rust-timer added a commit to rust-lang/rust that referenced this pull request Jul 20, 2026
Rollup merge of #159567 - rperier:update_rustc_crate_crossbeam_epoch, r=Mark-Simulacrum

Update rustc crate crossbeam-epoch to 0.9.20

See https://rustsec.org/advisories/RUSTSEC-2026-0204.html
and crossbeam-rs/crossbeam#1276
jfarcand added a commit to dravr-ai/dravr-platform that referenced this pull request Jul 24, 2026
…26-0204 (invalid pointer deref in fmt::Display for Atomic/Shared)

security-audit (cargo-deny advisories) hard-failed on main: crossbeam-epoch's fmt::Display for Atomic/Shared dereferences the underlying pointer — a UB deref for pointers built via Atomic::null/Shared::null — fixed upstream in 0.9.20 (crossbeam-rs/crossbeam#1276). Pure lockfile bump (transitive via crossbeam-deque -> rayon-core -> rayon behind criterion dev-dep + dravr-cageux); 0.9.20 is semver-compatible patch, no source change. Clears the advisory without an ignore entry, keeping deny.toml's ignore list to genuinely-accepted risks (RUSTSEC-2023-0071, -2026-0097).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant