Closed
Description
The personality function takes an _Unwind_Action
as an argument.
rust/library/std/src/sys/personality/gcc.rs
Lines 208 to 211 in d497e43
This is declared in the unwind crate as an enum
rust/library/unwind/src/unwinding.rs
Lines 5 to 13 in d497e43
But in reality, this is actually bit flags:
Indicates what processing the personality routine is expected to perform, as a bit
mask. The possible actions are described below.
(from https://gitlab.com/x86-psABIs/x86-64-ABI 6.2.6)
This means that invalid values are being passed to this function, which is undefined behavior (since the only valid values for an enum are its exact variants).
(found by @pitust)
Metadata
Metadata
Assignees
Labels
Area: Panicking machineryArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsCategory: This is a bug.Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessHigh priorityRelevant to the library team, which will review and decide on the PR/issue.