3 ms·
This blog article from February of this year gives some context: https://labs.f-secure.com/blog/tamago/ https://labs.f-secure.com/blog/tamago/ > TamaGo reduces
by dgellow 6y ago
This blog article from February of this year gives some context: https://labs.f-secure.com/blog/tamago/ https://labs.f-secure.com/blog/tamago/
> TamaGo reduces the attack surface of embedded systems firmware by removing any run time dependency on C code and inherently complex Operating Systems.
> It does so with minimal changes to the Go run time and a set of packages to provide drivers for supported boards.
- varispeed 6y agoOk so it removes the C surface of attack, but does it not introduce the Go one? What makes it superior when it comes to security?
- pjmlp 6y agoFor starters: - Bounds checking for strings and arrays - Proper strings - No implicit type conversions - Unsafe code requires use of unsafe package, thus very easy to track down in code reviews - No need for pointer arithmetic everywhere, using fat pointers instead (slices) - For "generic" code interface{} is type safe, whereas void* can be anything - No use-after-free thanks GC
- varispeed 6y agoThank you! Are you aware of any surfaces of attack against Go that do no exist in C?
- pjmlp 6y agoOnly stuff that might exploit bugs in the standard library, or runtime implementation. As everything, even formal specification based languages might have logical bugs in them. What C gets on top of that are memory corruption bugs and optimization bugs caused by optimizers taking advantage of UB. Naturally that can also happen in unsafe code blocks in other languages, the big difference in C is due to its strings and arrays, almost every line of code manipulates pointers without bounds checking, and exploits ensue.