Repository navigation
Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list - #161334
Conversation
|
What are the advantages of this PR over #161060? Keeping the same code structure is not an advantage as the original was already overcomplicated for what should have been a simple linked list. The "dummy node" trick comes with all of this additional baggage around pinning the list and has zero upsides. The dummy node also comes with an extra vestigial |
|
notably, this factors out a lot of complexity into an sgx-independent module which can thus be thoroughly triaged with miri - which is what I intend to make sure happens here. I haven't gotten a chance to look into this too thoroughly yet - it's going to be a big thing to review and thus will need me to sit down for a long afternoon or so - but keeping the existing code in use which has been somewhat battle-tested is at least a slight upside. |
|
I think we can all agree that this code is both tricky and very important to get right: it underpins all synchronization primitives in the standard library for the target that uses it. Any problems with synchronization can lead to hard to debug and catastrophic failures of code that relies on it. As such, we need to be conservative with making changes. The advantages of keeping the existing construction compared to changing it at all:
The advantages of the current construction vs. the specific alternative in #161060:
|
|
I do think in the long run there is value to switching over to a "nicer" implementation, if only for maintainability and to reduce the bus factor of the SGX target. I also think it's definitely lower priority than fixing current soundness bugs, and indeed factoring out the unsafe code so it can run on Miri is a useful first step toward allowing us to thoroughly test the other suggested impl as well ^^ |
|
@joboet mentioned he was working on a more generic queue replacement for several targets. I think that would be a better time for introducing any major changes - it certainly helps with the bus factor. |
There was a problem hiding this comment.
I spent quite some time going over this and attempting to break the code or otherwise trigger UB in Miri, and I'm happy to say I haven't managed to. I also threw Codex at it and the best it was able to come up with was an unsoundness if ~ten successive RNG failures occur and the subsequent panic is resumed from; I'm going to say that's the one blocking thing that should be addressed, but it's a small fix (see my comment).
The code itself looks fine and appears to mostly carry over the old code, which is a bit messy but will be superseded eventually by a refactor à la #161060, so nonblocking imo. The tests are a nice addition ^^ r=me once my comment is resolved & that call is properly caught.
@bors delegate+
| @@ -165,19 +216,19 @@ impl WaitQueue { | |||
| tcs: thread::current(), | |||
| wake: false, | |||
| })); | |||
| let entry_lock = lock.lock().queue.inner.push(&mut entry); | |||
| let entry_lock = lock.lock_pinned().as_mut().queue().inner().push(&mut entry); | |||
| if let Err(_e) = panic::catch_unwind(AssertUnwindSafe(|| before_wait())) { | |||
| rtabort!("Panic before wait on wakeup event or timeout") | |||
| } | |||
| usercalls::wait_timeout(EV_UNPARK, timeout, || entry_lock.lock().wake); | |||
There was a problem hiding this comment.
This can unwind on RNG exhaustion, so should be part of the catch_unwind block above or otherwise caught.
There was a problem hiding this comment.
@nia-e do you have a stack trace for the unwind?
There was a problem hiding this comment.
I'm guessing it's from https://github.com/rust-lang/rust/blob/main/library/std/src/sys/pal/sgx/abi/usercalls/mod.rs#L180. This should be addressed by making sure rtabort! is done instead of panic! (or maybe it's actually non-fatal in this case?). I'm not sure if that's appropriate for all uses of random() though so it may need some more thought.
There was a problem hiding this comment.
I've got the Miri backtrace ^^ manually forcing RNG to fail gave:
stack backtrace:
0: std::panicking::panic_handler
1: core::panicking::panic_fmt
2: sys::sync::unsafe_list::tests::link_then_unwind
3: ...miri_post_link_unwind_backtrace::{closure#0}
4: FnOnce::call_once
5: AssertUnwindSafe<...>::call_once
6: panicking::catch_unwind::do_call
7: panicking::catch_unwind
8: panic::catch_unwind
9: ...miri_post_link_unwind_backtrace
which suggests the callstack:
std::sys::random::sgx::fail
std::sys::random::sgx::rdrand64
std::sys::random::sgx::fill_bytes
<SystemRng as Rng>::fill_bytes
<RangeFull as Distribution<i64>>::sample
std::random::random::<i64>
sgx::abi::usercalls::wait
sgx::abi::usercalls::wait_timeout::wait_checked
sgx::abi::usercalls::wait_timeout
sgx::waitqueue::WaitQueue::wait_timeout
sgx::Condvar::wait_timeout
std::sync::Condvar::wait_timeout
I'm quite impressed this was able to trigger UB, but apparently it is. This is a minified form of the example Codex came up with for running in Miri (again, assuming rng always fails):
#[inline(never)]
fn link_then_unwind(list: Pin<&mut UnsafeList<u32>>) {
let mut entry = UnsafeListEntry::new(1234);
unsafe { list.push(&mut entry) };
panic!();
}
#[test]
fn miri_post_link_unwind_backtrace() {
let mut list = new_list();
let unwind = catch_unwind(AssertUnwindSafe(|| link_then_unwind(list.as_mut())));
assert!(unwind.is_err());
let _ = unsafe { list.as_mut().pop() };
}There was a problem hiding this comment.
I'm quite impressed this was able to trigger UB, but apparently it is.
It's a trivial “use-after-free” of stack memory. See the safety invariant on push which calls this out.
This comment has been minimized.
This comment has been minimized.
e8e4acf to
78ac762
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Pushed two commits to deal with the randomness generation failure issue. Will run the SGX test suite before r+ing. |
This comment has been minimized.
This comment has been minimized.
78ac762 to
37f650f
Compare
|
@raoulstrackx or @tvsfx could you review the two most recent commits? |
Randomness generation failure is an abnormal circumstance that should lead to program termination. It's not reasonable to let consumers of `std` functionality catch such failures and resume from the.
37f650f to
998113d
Compare
|
SGX test suite passed on commit 998113d (job rustc-rust-sgx-ci no. 491) |
Those 2 commits LGTM |
|
@bors r=nia-e |
Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list Replace invalid uses of references in `std::sys::pal::sgx::waitqueue::unsafe_list` internals with raw pointers. I tried to keep the code structure the same as much as possible. In addition to the use of references flagged in the original issue, it turns out the head/tail (raw) pointer stored in the linked list caused provenance issues in miri. Switched to using UnsafePinned for that. PR organization: * Commit 1: Main soundness fix. * Commit 2: Use pinning in the `pub(crate)` API for UnsafeList. This code predates pinning in Rust. I believe this change isn't strictly necessary as I believe it's valid to document pinning requirements in the unsafe methods on UnsafeList. However, I felt it's better to be explicit about this now that pinning is available in the language. * Commit 3: Move UnsafeList to a platform-agnostic location so miri can be run on the test suite. This also adds some tests. This PR was developed with Claude Fable 5 through extensive interactive use, where I directed a detailed plan for making the changes needed for this fix. My input includes keeping the structure the same and the new internal abstraction for dealing with raw pointers. I'm not familiar with miri, I used Claude to test the changes with miri. It said the test suite was failing before the changes (both stacked borrows and tree borrows) but passing after. The additional tests developed this way have been added in the third commit. The head/tail pointer provenance issue was found with Claude. I thoroughly reviewed all the code, including comments, and made manual changes/deletions where necessary/appropriate. The PR description was written by me. r? @nia-e Fixes rust-lang#114581 Fixes rust-lang#160603 Fixes rust-lang#161060 Supersedes rust-lang#160641
Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list Replace invalid uses of references in `std::sys::pal::sgx::waitqueue::unsafe_list` internals with raw pointers. I tried to keep the code structure the same as much as possible. In addition to the use of references flagged in the original issue, it turns out the head/tail (raw) pointer stored in the linked list caused provenance issues in miri. Switched to using UnsafePinned for that. PR organization: * Commit 1: Main soundness fix. * Commit 2: Use pinning in the `pub(crate)` API for UnsafeList. This code predates pinning in Rust. I believe this change isn't strictly necessary as I believe it's valid to document pinning requirements in the unsafe methods on UnsafeList. However, I felt it's better to be explicit about this now that pinning is available in the language. * Commit 3: Move UnsafeList to a platform-agnostic location so miri can be run on the test suite. This also adds some tests. This PR was developed with Claude Fable 5 through extensive interactive use, where I directed a detailed plan for making the changes needed for this fix. My input includes keeping the structure the same and the new internal abstraction for dealing with raw pointers. I'm not familiar with miri, I used Claude to test the changes with miri. It said the test suite was failing before the changes (both stacked borrows and tree borrows) but passing after. The additional tests developed this way have been added in the third commit. The head/tail pointer provenance issue was found with Claude. I thoroughly reviewed all the code, including comments, and made manual changes/deletions where necessary/appropriate. The PR description was written by me. r? @nia-e Fixes rust-lang#114581 Fixes rust-lang#160603 Fixes rust-lang#161060 Supersedes rust-lang#160641
This comment has been minimized.
This comment has been minimized.
Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list Replace invalid uses of references in `std::sys::pal::sgx::waitqueue::unsafe_list` internals with raw pointers. I tried to keep the code structure the same as much as possible. In addition to the use of references flagged in the original issue, it turns out the head/tail (raw) pointer stored in the linked list caused provenance issues in miri. Switched to using UnsafePinned for that. PR organization: * Commit 1: Main soundness fix. * Commit 2: Use pinning in the `pub(crate)` API for UnsafeList. This code predates pinning in Rust. I believe this change isn't strictly necessary as I believe it's valid to document pinning requirements in the unsafe methods on UnsafeList. However, I felt it's better to be explicit about this now that pinning is available in the language. * Commit 3: Move UnsafeList to a platform-agnostic location so miri can be run on the test suite. This also adds some tests. This PR was developed with Claude Fable 5 through extensive interactive use, where I directed a detailed plan for making the changes needed for this fix. My input includes keeping the structure the same and the new internal abstraction for dealing with raw pointers. I'm not familiar with miri, I used Claude to test the changes with miri. It said the test suite was failing before the changes (both stacked borrows and tree borrows) but passing after. The additional tests developed this way have been added in the third commit. The head/tail pointer provenance issue was found with Claude. I thoroughly reviewed all the code, including comments, and made manual changes/deletions where necessary/appropriate. The PR description was written by me. r? @nia-e Fixes #114581 Fixes #160603 Fixes #161060 Supersedes #160641
|
💔 Test for 9290cd7 failed: CI. Failed job:
|
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
|
@bors retry |
Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list Replace invalid uses of references in `std::sys::pal::sgx::waitqueue::unsafe_list` internals with raw pointers. I tried to keep the code structure the same as much as possible. In addition to the use of references flagged in the original issue, it turns out the head/tail (raw) pointer stored in the linked list caused provenance issues in miri. Switched to using UnsafePinned for that. PR organization: * Commit 1: Main soundness fix. * Commit 2: Use pinning in the `pub(crate)` API for UnsafeList. This code predates pinning in Rust. I believe this change isn't strictly necessary as I believe it's valid to document pinning requirements in the unsafe methods on UnsafeList. However, I felt it's better to be explicit about this now that pinning is available in the language. * Commit 3: Move UnsafeList to a platform-agnostic location so miri can be run on the test suite. This also adds some tests. This PR was developed with Claude Fable 5 through extensive interactive use, where I directed a detailed plan for making the changes needed for this fix. My input includes keeping the structure the same and the new internal abstraction for dealing with raw pointers. I'm not familiar with miri, I used Claude to test the changes with miri. It said the test suite was failing before the changes (both stacked borrows and tree borrows) but passing after. The additional tests developed this way have been added in the third commit. The head/tail pointer provenance issue was found with Claude. I thoroughly reviewed all the code, including comments, and made manual changes/deletions where necessary/appropriate. The PR description was written by me. r? @nia-e Fixes rust-lang#114581 Fixes rust-lang#160603 Fixes rust-lang#161060 Supersedes rust-lang#160641
…uwer Rollup of 6 pull requests Successful merges: - #161334 (Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list) - #162346 (rustdoc: add missing CCI union logic) - #162273 (doc: replace `exceeding_bitshifts` with `arithmetic_overflow`) - #162539 (Update wasip2/wasip3 libstd crate dependencies) - #162542 (Gate ELF code in metadata.rs for ELF only) - #162604 (Update windows-gnu support docs)
Rollup merge of #161334 - jethrogb:fix-sgx-unsafe-list, r=nia-e Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list Replace invalid uses of references in `std::sys::pal::sgx::waitqueue::unsafe_list` internals with raw pointers. I tried to keep the code structure the same as much as possible. In addition to the use of references flagged in the original issue, it turns out the head/tail (raw) pointer stored in the linked list caused provenance issues in miri. Switched to using UnsafePinned for that. PR organization: * Commit 1: Main soundness fix. * Commit 2: Use pinning in the `pub(crate)` API for UnsafeList. This code predates pinning in Rust. I believe this change isn't strictly necessary as I believe it's valid to document pinning requirements in the unsafe methods on UnsafeList. However, I felt it's better to be explicit about this now that pinning is available in the language. * Commit 3: Move UnsafeList to a platform-agnostic location so miri can be run on the test suite. This also adds some tests. This PR was developed with Claude Fable 5 through extensive interactive use, where I directed a detailed plan for making the changes needed for this fix. My input includes keeping the structure the same and the new internal abstraction for dealing with raw pointers. I'm not familiar with miri, I used Claude to test the changes with miri. It said the test suite was failing before the changes (both stacked borrows and tree borrows) but passing after. The additional tests developed this way have been added in the third commit. The head/tail pointer provenance issue was found with Claude. I thoroughly reviewed all the code, including comments, and made manual changes/deletions where necessary/appropriate. The PR description was written by me. r? @nia-e Fixes #114581 Fixes #160603 Fixes #161060 Supersedes #160641
Pkgsrc changes: * Version & checksum changes. * Adapt patches to match. Upstream changes: Version 1.100.0 (2026-11-12) ========================== Language -------- - [Stabilize never type] (rust-lang/rust#155499) - [Lint against repeated `#[repr(..)]` attributes] (rust-lang/rust#157036) - [Stabilize `extern "custom"`] (rust-lang/rust#158504) - [Extend `dropping_references`, `dropping_copy_types` and `undropped_manually_drops` lints to `drop_in_place`] (rust-lang/rust#160229) - [`unfulfilled_lint_expectations` no longer fires on `#[expect(dead_code)]` inside code that is covered by a dead parent's diagnostic] (rust-lang/rust#161005) - [Turn the error for `repr(align)` fields in a `repr(packed)` type into a deny-by-default lint `aligned_fields_in_packed`] (rust-lang/rust#162160) - [volatile: allow accesses to non-AM memory to trap] (rust-lang/rust#160564) Compiler -------- - [Stabilize `-Cprofile-sample-use`] (rust-lang/rust#155942) - [Enable next solver by default in orphanck] (rust-lang/rust#160668) Platform Support ---------------- - [`i686-pc-windows-gnu` is now a tier 2 without host tools target] (rust-lang/rust#161681) - [Promote `wasm32-wasip3` to Tier 2] (rust-lang/rust#161940) - [Add new Tier 3 target `powerpc64-sony-ps3`] (rust-lang/rust#162072) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html Libraries --------- - [Stabilize custom allocators] (rust-lang/rust#156882) - [Map `ENOTSUP` to `ErrorKind::Unsupported`] (rust-lang/rust#158580) - [Fix soundness issues in `std::sys::pal::sgx::waitqueue::unsafe_list`] (rust-lang/rust#161334) Stabilized APIs --------------- - [`impl PartialEq<Cow<'_, [U]>> for Vec<T, A>`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-Vec%3CT,+A%3E) - [`impl PartialEq<Cow<'_, [U]>> for &[T]`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26%5BT%5D) - [`impl PartialEq<Cow<'_, [U]>> for &mut [T]`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26mut+%5BT%5D) - [`std::alloc::Allocator`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html) - [`std::alloc::Global`] (https://doc.rust-lang.org/stable/std/alloc/struct.Global.html) - [`std::alloc::System`] (https://doc.rust-lang.org/stable/std/alloc/struct.System.html) - [`impl Allocator for Global`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Global) - [`impl Allocator for System`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-System) - [`impl<A: Allocator> Allocator for &A`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26A) - [`impl<T: Allocator, A: Allocator> Allocator for Box<T, A>`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Box%3CT,+A%3E) - [`impl<A: Allocator> Allocator for &mut A`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26mut+A) - [`impl<T: Allocator, A: Allocator> Allocator for Arc<T, A>`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Arc%3CT,+A%3E) - [`impl<T: Allocator, A: Allocator> Allocator for Rc<T, A>`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Rc%3CT,+A%3E) - [`Box::new_in`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_in) - [`Box::from_raw_in`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_raw_in) - [`Box::from_non_null_in`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_non_null_in) - [`Box::into_raw_with_allocator`] (https://doc.rust-lang.org/std/std/boxed/struct.Box.html#method.into_raw_with_allocator) - [`Box::into_non_null_with_allocator`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_non_null_with_allocator) - [`Box::allocator`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.allocator) - [`Vec::new_in`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.new_in) - [`Vec::with_capacity_in`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.with_capacity_in) - [`Vec::from_raw_parts_in`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_raw_parts_in) - [`Vec::from_parts_in`] (https://doc.rust-lang.org/stable/stable/vec/struct.Vec.html#method.from_parts_in) - [`Vec::into_raw_parts_with_allocator`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts_with_allocator) - [`Vec::into_parts_with_allocator`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_parts_with_allocator) - [`Vec::allocator`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.allocator) - [`Child::main_thread_handle`] (https://doc.rust-lang.org/stable/std/os/windows/process/trait.ChildExt.html#tymethod.main_thread_handle) - [`impl Default for std::sync::Once`] (https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-Default-for-Once) - [`bool::toggle`] (https://doc.rust-lang.org/stable/std/primitive.bool.html#method.toggle) - [`Box::take`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.take) - [`Box::map`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.map) - [`Rc::map`] (https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.map) - [`Arc::map`] (https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.map) - [`impl AsRef<T> for !`] (https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsRef<T>-for-!) - [`impl AsMut<T> for !`] (https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsMut<T>-for-!) - [`core::mem::DropGuard`] (https://doc.rust-lang.org/stable/core/mem/struct.DropGuard.html) - [`core::mem::conjure_zst`] (https://doc.rust-lang.org/stable/core/mem/fn.conjure_zst.html) - [`UnsafeCell::replace`] (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.replace) - [`UnsafeCell::as_ref_unchecked`] (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_ref_unchecked) - [`UnsafeCell::as_mut_unchecked`] (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_mut_unchecked) - [`str::trim_prefix`] (https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_prefix) - [`str::trim_suffix`] (https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_suffix) - [`[T]::trim_prefix`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_prefix) - [`[T]::trim_suffix`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_suffix) - [`Path::trim_prefix`] (https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.trim_prefix) - [`Vec::from_fn`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_fn) - [`os::windows::process::CommandExt::show_window`] (https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html#tymethod.show_window) Cargo ----- - Introduced Cargo's own linting system: some Cargo warnings are now emitted as lints that users can control in the `[lints.cargo]` table. This includes a new built-in unused dependency check via the `cargo::unused_dependencies` lint. [docs](https://doc.rust-lang.org/stable/cargo/reference/lints.html) [#17298](rust-lang/cargo#17298) - Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in `Cargo.lock`. ([RFC 3923] (https://rust-lang.github.io/rfcs/3923-cargo-min-publish-age.html)) [docs] (https://doc.rust-lang.org/stable/cargo/reference/resolver.html#publish-age) [#17335] (rust-lang/cargo#17335) - cargo-install: now uses the existing lockfile in the `.crate` tarball by default. `--locked` in cargo install becomes a no-op. [#17388](rust-lang/cargo#17388) - Cargo now uses a new directory layout for intermediate build artifacts. Tools that inspect the build directory may need to use [Cargoâs JSON messages] (https://doc.rust-lang.org/stable/cargo/reference/external-tools.html#json-messages) to locate build artifacts instead of relying on the build directory layout. The layout is not a stable interface and is subject to change. ([build cache doc] (https://doc.rust-lang.org/stable/cargo/reference/build-cache.html)) [#17354](rust-lang/cargo#17354) Rustdoc ----- - [Add new `invalid_markdown_table` rustdoc lint] (rust-lang/rust#159583) Compatibility Notes ------------------- - [Closures now more precisely capture variables used in `if let`. This may cause new errors] (rust-lang/rust#154210) - [Check dyn-compatibility of trait objects in more places] (rust-lang/rust#154992) - [`Infallible` is now a type alias to `!`] (rust-lang/rust#155499) - [The never type fallback was changed to `!` on all editions] (rust-lang/rust#155499) - [`box` patterns are no longer syntactically allowed] (rust-lang/rust#156749) - [Report Query Cycle errors in more cases when computing the layout of enums with explicit discriminants] (rust-lang/rust#157562) - [Always escape grapheme extenders in `str::escape_debug`] (rust-lang/rust#158303) - [Make let-else respect `macro_rules` `expr` metavariable grouping] (rust-lang/rust#158515) - [`Iterator::{min,max}(_by_key)` changed which `Ord` methods they use.] (rust-lang/rust#160203) This cannot change behaviour (other than being potentially faster) for types correctly following the [`Ord` rules] (https://doc.rust-lang.org/std/cmp/trait.Ord.html), but may impact types with inconsistent trait implementations. - [Emit an error when trying to enable SSE/AVX on an x86 (32bit or 64bit) softfloat target] (rust-lang/rust#160302) - [Require windowed (and exception) for Xtensa ABI] (rust-lang/rust#160643) - [windows-gnullvm: always link libunwind statically] (rust-lang/rust#160712) - [From version 1.94 up to 1.100 a number of ARMv7-A hardfloat targets required the `VFPv3-D32` FPU as a minimum, as they erroneously had the `d32` feature in their baseline list of features. Breakage introduced as a result of correcting this can be fixed by passing `-Ctarget-feature=+d32` to Rust.] (rust-lang/rust#160911) - [Change "Rust" ABI on x86 to use SSE registers if they are always-available for the current target] (rust-lang/rust#161583) - [Make the `ambiguous_glob_imported_traits` lint fire in slightly more cases] (rust-lang/rust#161805) - [Make `+fix-cortex-a53-835769` a default feature for `aarch64-unknown-fuchsia`] (rust-lang/rust#161886) - [Some impls on `Box` have been generalised to arbitrary allocators, which may cause new type inference errors] (rust-lang/rust#161946) - [The standard library now uses Unicode version 18.0.0] (https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.UNICODE_VERSION) - [WASI SDK version was bumped from 33 to 34] (rust-lang/rust#163809) - [On ARM targets, `-Ctarget-feature`/`-Ctarget-cpu` values that would alter the ABI are rejected as hard errors now.] (rust-lang/rust#161280) Other ----- - [Test harness now allows passing `--test-threads` and `--color` multiple times, with later arguments overriding earlier ones] (rust-lang/rust#161312)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [rust](https://rust-lang.org/) ([source](https://github.com/rust-lang/rust), [changelog](https://github.com/rust-lang/rust/blob/main/RELEASES.md)) | tools | minor | `1.99.1` → `1.100.0` | | [rust](https://hub.docker.com/_/rust) ([source](https://github.com/rust-lang/docker-rust)) | stage | minor | `1.99-slim-trixie` → `1.100-slim-trixie` | | [rust](https://hub.docker.com/_/rust) ([source](https://github.com/rust-lang/docker-rust)) | final | minor | `1.99-slim-trixie` → `1.100-slim-trixie` | --- ### Release Notes <details> <summary>rust-lang/rust (rust)</summary> ### [`v1.100.0`](https://github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-11000-2026-11-12) [Compare Source](rust-lang/rust@1.99.1...1.100.0) \========================== <a id="1.100.0-Language"></a> ## Language - [Stabilize never type](rust-lang/rust#155499) - [Lint against repeated `#[repr(..)]` attributes](rust-lang/rust#157036) - [Stabilize `extern "custom"`](rust-lang/rust#158504) - [Extend `dropping_references`, `dropping_copy_types` and `undropped_manually_drops` lints to `drop_in_place`](rust-lang/rust#160229) - [`unfulfilled_lint_expectations` no longer fires on `#[expect(dead_code)]` inside code that is covered by a dead parent's diagnostic](rust-lang/rust#161005) - [Turn the error for `repr(align)` fields in a `repr(packed)` type into a deny-by-default lint `aligned_fields_in_packed`](rust-lang/rust#162160) - [volatile: allow accesses to non-AM memory to trap](rust-lang/rust#160564) <a id="1.100.0-Compiler"></a> ## Compiler - [Stabilize `-Cprofile-sample-use`](rust-lang/rust#155942) - [Enable next solver by default in orphanck](rust-lang/rust#160668) <a id="1.100.0-Platform-Support"></a> ## Platform Support - [`i686-pc-windows-gnu` is now a tier 2 without host tools target](rust-lang/rust#161681) - [Promote `wasm32-wasip3` to Tier 2](rust-lang/rust#161940) - [Add new Tier 3 target `powerpc64-sony-ps3`](rust-lang/rust#162072) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html <a id="1.100.0-Libraries"></a> ## Libraries - [Stabilize custom allocators](rust-lang/rust#156882) - [Map `ENOTSUP` to `ErrorKind::Unsupported`](rust-lang/rust#158580) - [Fix soundness issues in `std::sys::pal::sgx::waitqueue::unsafe_list`](rust-lang/rust#161334) <a id="1.100.0-Stabilized-APIs"></a> ## Stabilized APIs - [`impl PartialEq<Cow<'_, [U]>> for Vec<T, A>`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-Vec%3CT,+A%3E) - [`impl PartialEq<Cow<'_, [U]>> for &[T]`](https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26%5BT%5D) - [`impl PartialEq<Cow<'_, [U]>> for &mut [T]`](https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26mut+%5BT%5D) - [`std::alloc::Allocator`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html) - [`std::alloc::Global`](https://doc.rust-lang.org/stable/std/alloc/struct.Global.html) - [`std::alloc::System`](https://doc.rust-lang.org/stable/std/alloc/struct.System.html) - [`impl Allocator for Global`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Global) - [`impl Allocator for System`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-System) - [`impl<A: Allocator> Allocator for &A`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26A) - [`impl<T: Allocator, A: Allocator> Allocator for Box<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Box%3CT,+A%3E) - [`impl<A: Allocator> Allocator for &mut A`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26mut+A) - [`impl<T: Allocator, A: Allocator> Allocator for Arc<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Arc%3CT,+A%3E) - [`impl<T: Allocator, A: Allocator> Allocator for Rc<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Rc%3CT,+A%3E) - [`Box::new_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_in) - [`Box::from_raw_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_raw_in) - [`Box::from_non_null_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_non_null_in) - [`Box::into_raw_with_allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_raw_with_allocator) - [`Box::into_non_null_with_allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_non_null_with_allocator) - [`Box::allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.allocator) - [`Vec::new_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.new_in) - [`Vec::with_capacity_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.with_capacity_in) - [`Vec::from_raw_parts_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_raw_parts_in) - [`Vec::from_parts_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_parts_in) - [`Vec::into_raw_parts_with_allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts_with_allocator) - [`Vec::into_parts_with_allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_parts_with_allocator) - [`Vec::allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.allocator) - [`Child::main_thread_handle`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.ChildExt.html#tymethod.main_thread_handle) - [`impl Default for std::sync::Once`](https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-Default-for-Once) - [`bool::toggle`](https://doc.rust-lang.org/stable/std/primitive.bool.html#method.toggle) - [`Box::take`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.take) - [`Box::map`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.map) - [`Rc::map`](https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.map) - [`Arc::map`](https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.map) - [`impl AsRef<T> for !`](https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsRef<T>-for-!) - [`impl AsMut<T> for !`](https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsMut<T>-for-!) - [`core::mem::DropGuard`](https://doc.rust-lang.org/stable/core/mem/struct.DropGuard.html) - [`core::mem::conjure_zst`](https://doc.rust-lang.org/stable/core/mem/fn.conjure_zst.html) - [`UnsafeCell::replace`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.replace) - [`UnsafeCell::as_ref_unchecked`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_ref_unchecked) - [`UnsafeCell::as_mut_unchecked`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_mut_unchecked) - [`str::trim_prefix`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_prefix) - [`str::trim_suffix`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_suffix) - [`[T]::trim_prefix`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_prefix) - [`[T]::trim_suffix`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_suffix) - [`Path::trim_prefix`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.trim_prefix) - [`Vec::from_fn`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_fn) - [`os::windows::process::CommandExt::show_window`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html#tymethod.show_window) <a id="1.100.0-Cargo"></a> ## Cargo - Introduced Cargo's own linting system: some Cargo warnings are now emitted as lints that users can control in the `[lints.cargo]` table. This includes a new built-in unused dependency check via the `cargo::unused_dependencies` lint. [docs](https://doc.rust-lang.org/stable/cargo/reference/lints.html) [#​17298](rust-lang/cargo#17298) - Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in `Cargo.lock`. ([RFC 3923](https://rust-lang.github.io/rfcs/3923-cargo-min-publish-age.html)) [docs](https://doc.rust-lang.org/stable/cargo/reference/resolver.html#publish-age) [#​17335](rust-lang/cargo#17335) - cargo-install: now uses the existing lockfile in the `.crate` tarball by default. `--locked` in cargo install becomes a no-op. [#​17388](rust-lang/cargo#17388) - Cargo now uses a new directory layout for intermediate build artifacts. Tools that inspect the build directory may need to use [Cargo’s JSON messages](https://doc.rust-lang.org/stable/cargo/reference/external-tools.html#json-messages) to locate build artifacts instead of relying on the build directory layout. The layout is not a stable interface and is subject to change. ([build cache doc](https://doc.rust-lang.org/stable/cargo/reference/build-cache.html)) [#​17354](rust-lang/cargo#17354) ## Rustdoc - [Add new `invalid_markdown_table` rustdoc lint](rust-lang/rust#159583) <a id="1.100.0-Compatibility-Notes"></a> ## Compatibility Notes - [Closures now more precisely capture variables used in `if let`. This may cause new errors](rust-lang/rust#154210) - [Check dyn-compatibility of trait objects in more places](rust-lang/rust#154992) - [`Infallible` is now a type alias to `!`](rust-lang/rust#155499) - [The never type fallback was changed to `!` on all editions](rust-lang/rust#155499) - [`box` patterns are no longer syntactically allowed](rust-lang/rust#156749) - [Report Query Cycle errors in more cases when computing the layout of enums with explicit discriminants](rust-lang/rust#157562) - [Always escape grapheme extenders in `str::escape_debug`](rust-lang/rust#158303) - [Make let-else respect `macro_rules` `expr` metavariable grouping](rust-lang/rust#158515) - [`Iterator::{min,max}(_by_key)` changed which `Ord` methods they use.](rust-lang/rust#160203) This cannot change behaviour (other than being potentially faster) for types correctly following the [`Ord` rules](https://doc.rust-lang.org/std/cmp/trait.Ord.html), but may impact types with inconsistent trait implementations. - [Emit an error when trying to enable SSE/AVX on an x86 (32bit or 64bit) softfloat target](rust-lang/rust#160302) - [Require windowed (and exception) for Xtensa ABI](rust-lang/rust#160643) - [windows-gnullvm: always link libunwind statically](rust-lang/rust#160712) - [From version 1.94 up to 1.100 a number of ARMv7-A hardfloat targets required the `VFPv3-D32` FPU as a minimum, as they erroneously had the `d32` feature in their baseline list of features. Breakage introduced as a result of correcting this can be fixed by passing `-Ctarget-feature=+d32` to Rust.](rust-lang/rust#160911) - [Change "Rust" ABI on x86 to use SSE registers if they are always-available for the current target](rust-lang/rust#161583) - [Make the `ambiguous_glob_imported_traits` lint fire in slightly more cases](rust-lang/rust#161805) - [Make `+fix-cortex-a53-835769` a default feature for `aarch64-unknown-fuchsia`](rust-lang/rust#161886) - [Some impls on `Box` have been generalised to arbitrary allocators, which may cause new type inference errors](rust-lang/rust#161946) - [The standard library now uses Unicode version 18.0.0](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.UNICODE_VERSION) - [WASI SDK version was bumped from 33 to 34](rust-lang/rust#163809) - [On ARM targets, `-Ctarget-feature`/`-Ctarget-cpu` values that would alter the ABI are rejected as hard errors now.](rust-lang/rust#161280) <a id="1.100.0-Internal-Changes"></a> ## Other - [Test harness now allows passing `--test-threads` and `--color` multiple times, with later arguments overriding earlier ones](rust-lang/rust#161312) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjcuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyNy40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2356 Reviewed-by: Thomas de Zeeuw <[email protected]>
View all comments
Replace invalid uses of references in
std::sys::pal::sgx::waitqueue::unsafe_listinternals with raw pointers. I tried to keep the code structure the same as much as possible. In addition to the use of references flagged in the original issue, it turns out the head/tail (raw) pointer stored in the linked list caused provenance issues in miri. Switched to using UnsafePinned for that.PR organization:
pub(crate)API for UnsafeList. This code predates pinning in Rust. I believe this change isn't strictly necessary as I believe it's valid to document pinning requirements in the unsafe methods on UnsafeList. However, I felt it's better to be explicit about this now that pinning is available in the language.This PR was developed with Claude Fable 5 through extensive interactive use, where I directed a detailed plan for making the changes needed for this fix. My input includes keeping the structure the same and the new internal abstraction for dealing with raw pointers. I'm not familiar with miri, I used Claude to test the changes with miri. It said the test suite was failing before the changes (both stacked borrows and tree borrows) but passing after. The additional tests developed this way have been added in the third commit. The head/tail pointer provenance issue was found with Claude. I thoroughly reviewed all the code, including comments, and made manual changes/deletions where necessary/appropriate. The PR description was written by me.
r? @nia-e
Fixes #114581
Fixes #160603
Fixes #161060
Supersedes #160641