11 year old unsoundness bugs found in Rust borrow checker

2 days ago by cm0002 to c/programming

NoteGiven that this issue has been shared online and is currently getting quite a few visitors, here's some additional context. Rust's type system is intended to prevent memory unsafety. Upholding ...
AzuraTheSpellkissed 32 points 2 days ago

Given that this issue has been shared online and is currently getting quite a few visitors, here's some additional context.

Rust's type system is intended to prevent memory unsafety. Upholding this promise is something we take very seriously, which is why we've been working on things like the next-generation trait solver, the region constraint rework, and more generally Project Zero. It is a large priority of the Types Team to fix all type system unsoundnesses and to work towards there being a solid foundation to minimize the risk of unknown ones.

This bug is a P-high issue and would have been P-critical regardless of whether people encountered it in the wild. The reason that it is "only P-high" is that it's 11 years old. A bug like this which has not been found during the last 11 years cannot actually be that easy to hit.

Looking at the bug itself, it is also very likely that this unsoundness has not caused memory unsafety by accident. While it looks easy to trigger, to exploit this you need an intentionally malicious Drop implementation.

path: 0 26324709, hotness: undefined, score: 32, children: 2
glimse 8 points a day ago

A bug like this which has not been found during the last 11 years cannot actually be that easy to hit.

Not sure why but I found this completely justified reasoning to be very funny. Getting ahead of the people complaining that it needs fixing NOW by saying, correctly, "it's not that serious"

path: 0 26324709 26328373, hotness: undefined, score: 8, children: 1
thedeadwalking4242 7 points a day ago

I do this at work all the time "this tech has been available to us for the past 20 years and you did nothing with it, now you want it done in a year?"

path: 0 26324709 26328373 26334427, hotness: undefined, score: 7, children: 0
AwesomeLowlander 11 points 2 days ago

So THIS is why my Rust app kept refusing to compile!

(/jk)

path: 0 26324717, hotness: undefined, score: 11, children: 2
BradleyUffner 7 points a day ago

Yes. That, and no other reason 馃憤

path: 0 26324717 26334364, hotness: undefined, score: 7, children: 0
remustan37 4 points 2 days ago

Nah.. Its probably due to a common bug found in DNA compilers 馃樅

path: 0 26324717 26324748, hotness: undefined, score: 4, children: 0
sukhmel 3 points a day ago

This needs to be in cve-rs (I'm too lazy for that tho)

path: 0 26328965, hotness: undefined, score: 3, children: 2
BB_C 2 points a day ago

A PR fixing the issue has already been submitted (which surfaced another issue, but it doesn't concern stable).

People likening this to the issue behind cve-rs (which is blocked on a major rework) are clueless, which happens to be par for the course regarding anything Rust. So no surprises there.

path: 0 26328965 26331872, hotness: undefined, score: 2, children: 1
sukhmel 2 points a day ago

I just find cve-rs hilarious, disregarding if the issue is fixed or not :)

path: 0 26328965 26331872 26332192, hotness: undefined, score: 2, children: 0
programming
programming

@programming.dev

login for more options
28830
3723
3326

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev


go to feed...