More interested to see how you can use just a single byte overflow to trigger RCE. Definitely achievable but sounds tough.
There was an even more restrictive single NUL byte heap overflow in glibc in 2014 that the ProjectZero folks managed to turn into ACE and thus an LPE in setuid binaries[1]. The final section that talks about bickering over exploitability seems particularly pertinent today.
[1]: https://projectzero.google/2014/08/the-poisoned-nul-byte-201...
loading story #50561888
There was an article on this topic in Phrack 55 back in 1999: https://phrack.org/issues/55/frame-pointer-overwriting#artic...
Exploitation conditions are likely more challenging today but that’s the earliest reference I know for exploiting a single byte overflow.
The commit message for the Ruby fix says it's a heap buffer, so frame pointer smashing would not apply here.
Exactly, these advanced heap exploitation techniques are a relatively new development (last decade or so) and were not even remotely known in 1999. Most of the developments were driven by browser exploitation.
The next byte in the heap might be the size of an allocation, so if you overwrite it and then free that other allocation, the heap code will think that there is a very large free area there instead of a small one, once you allocate that, you now have a very large heap overflow and can do more fun things. That is just one idea, there are many other ways.