3 ms·
There were so many critical vulnerabilities attributed to that... and in spite of putting tons of measures this is still potential danger. I knew projects decid
by jakozaur 11y ago
There were so many critical vulnerabilities attributed to that... and in spite of putting tons of measures this is still potential danger. I knew projects decided to use Java instead of C++ (which got array boundary checks) mostly to limit security surface.
Maybe if we could start CPU architecture from scratch, array with sizes would make more sense? Maybe even we could done it so memory segmentation would no longer be needed:
https://en.wikipedia.org/wiki/X86_memory_segmentation https://en.wikipedia.org/wiki/X86_memory_segmentation
Haven't figured out the details, but maybe we can even gain some performance that way.
- shanemhansen 11y agoFriendly reminder: it's not just a choice between C and Java. In order to get bounds checking on arrays it's not necessary to give up the advantages of native programming and use a virtual machine. Rust is obviously a great example. So is Go. Bounds checked arrays in languages that compile to native is not a new thing.
- Alphasite_ 11y agoSwift is another new language with it. Its getting to be the norm now.
- nickpsecurity 11y agoSmart thinking. It was already done in a dozen different ways. Two cited in my comment: https://news.ycombinator.com/item?id=10125348 https://news.ycombinator.com/item?id=10125348 Also see capability-based computer systems by levy. Free book. Pointer protection by itself can give all kinds of benefits. Modern version of that is Cambridge's CHERI processor which is open-source and already runs FreeBSD. :) https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/ https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/