Re:Writing into Uninitialized Buffers in Rust
by dooglius on Wednesday May 21, 2025 @12:24PM
(#44053141)
I've edited/clarified the claim above. Parent did say "without you having a bug" and entering an UNPREDICTABLE state would be buggy code. Also, "maybe puts garbage data in a register" is not UB, it's a much more reasonable thing in UB (the definition of UNPREDICTABLE prior to ARMv8 does seem to allow for UB, however). I don't believe that such an UNPREDICTABLE state is reachable from user-space/unprivileged code (or else it would violate the chip's security properties) -- but if I'm wrong on that I'd be interested in an example.
[ Parent
| on HN ]
Re:Writing into Uninitialized Buffers in Rust
by adastra22 on Wednesday May 21, 2025 @01:55PM
(#44054220)
Here are just a few examples:
https://mohitmv.github.io/blog/Shocking-Undefined-Behaviour-...