Open
Description
Various synchronization primitives in std
are not robust against unwinding triggered inside the std
implementation. This may result in
- double panics
- deadlocks
- Mutexes being poisoned that shouldn't be
Such unwinding may be triggered in many different ways, for example:
- pthread_cancel on certain pthread implementations
- assertion/unwrap failure due to a variety of causes:
- The kernel may return an unexpected error value from a system call
- The libc implementation may return an unexpected error from a call
- An unexpected return value due to the use of Linux seccomp
- Iago attacks
I've identified at least the following cases. Fixes for some of these have been proposed and rejected in #58042 and #58461.