>>102buffer overflows and injections can be prevented by dependent types (although it's harder for injections as they usually happen on the boundaries of languages - e.g. calling shell from C or SQL from PHP). logic bugs only theoretically can, but that's equivalent to formally proving a program - which is never trivial and can't be done in general case (because of halting problem).
of course you conveniently ignored how priv-esc can happen by exploiting OS-level stuff. lets see
these guys implement diff dependent types prevent that