Defining the Rust 2024 edition
Defining the Rust 2024 edition
Posted Feb 3, 2024 1:16 UTC (Sat) by jschrod (subscriber, #1646)In reply to: Defining the Rust 2024 edition by mb
Parent article: Defining the Rust 2024 edition
This is not worthy to discuss.
*plonk*
Posted Feb 3, 2024 9:36 UTC (Sat)
by mb (subscriber, #50428)
[Link]
Really? Nobody said that in this whole discussion.
But you know what? You are actually right.
But it is no coincidence that these classes of bugs make the majority of security bugs.
And that is what makes Rust code have *almost* no security problems by definition.
Defining the Rust 2024 edition
I said that this particular CVE would probably not have existed, if the function was written in Rust.
Look at it!
It is a classical buffer overflow. Buffer overflows and integer overflows resulting in buffer overflows are *the* most common thing when it comes to security problems.
This bug would almost certainly not have been exploitable in Rust.
It would have been garbage data in -> garbage out (program termination).
Rust code can also have security problems, of course.
Rust only tries to make certain classes of bugs impossible or much much harder to express.
Of course you can still incorrectly implement your security checks for your door entry mechanism. But Rust ensures that it won't outright blow up right into your face with UB.