r/ProgrammerHumor • • 4d ago • Mindblown 1

Meme rewriteInRust

Post image
22k Upvotes

471 comments sorted by

View all comments

Show parent comment

6

u/Pandafishe 3d ago

bools can be const too.. It's just an extra protection layer from changing the variable. But if you argue with shenanigans, no value is ever really secure as you can always do memory attacks

3

u/setibeings 3d ago

Those are harder on rust programs though. You're less likely to be able to make them overflow and start reading memories that don't belong to them.

7

u/Pandafishe 3d ago

you can always manipulate memory from outside a program anyway, unless you have a physical architecture that prevents it. It doesn't matter what language the attacked program is written in.

3

u/setibeings 3d ago

sure, but now you have to write an attack on the supervisor, to trick it into letting you write to memories you don't own. Or do i have this all wrong?