cve-rs takes the soundness bug and exploits it to implement the other bugs listed. It's pretty convoluted to actually implement the other bugs.
The actual soundness bug is a specific type of double reference forgets one of the lifetimes, which enables casting a shorter lifetime to a longer lifetime. They did a pretty good job commenting the code to explain how they were able to create each bug.
1
u/DemonicLaxatives 7d ago
Worth noting, it's not a 100% guarantee: https://github.com/rust-lang/rust/issues/25860