4 ms·
Forever. Computers are fundamentally unsafe if you tell them to do something you shouldn't have. That's true for every language which has ever been useful.
by mort96 4y ago
Forever. Computers are fundamentally unsafe if you tell them to do something you shouldn't have. That's true for every language which has ever been useful.
- flangola7 4y agoFormal verification is a thing. Good architectures make undesirable action rare. What's the last time you heard about a worm that spreads from one Android phone to the next, without the owners realizing it?
- mavhc 4y agoGiven that the majority of android phones have dozens of well known security flaws (because they don't get updates, or get them very late), it's kinda weird they're not all one massive botnet. Why is that?
- flangola7 4y agoMostly because the underlying design makes that difficult. On a traditional desktop an application running as root can do anything, and one running as user can do slightly less than everything. On Android running as root doesn't even exist as a function, and running as user comes with significant limitations enforced structurally by low level SELinux code in the kernel and OS. Android malware can't infect an existing application because the OS both segregates their storage and verifies code signatures. TPMs take this a step further and create not only logical but physical separation between the main CPU and many cryptographic functions. Exploits still happen but you need a much longer chain of vulnerabilities to pull it off.
- mort96 4y agoAre you claiming the entirety of Android is formally verified? Do you have links to those papers?
- flangola7 4y agoNo, I'm claiming Android has good architecture. If you combined good arch with verification then exploits would be very rare indeed.
- woodruffw 4y agoThis isn’t a meaningful response: “the computer does what you tell it to do” doesn’t mean the same thing as “the computer ends up in an exploitable state when you don’t tell it to do the right thing.”
- mort96 4y agoYet computers necessarily end up in an exploitable state when you don't tell them to do the right thing. Your back-end is written in Rust? If you don't do your auth checks right, one user can delete another user's content.
- majewsky 4y agoSure, but given a fixed probability of introducing a bug at each possible place, "doing an auth check correctly" has much less probability of being buggy than "doing every memory allocation correctly" because it happens in several magnitudes less places.
- deleted 4y ago[deleted]
- woodruffw 4y agoNo, not necessarily: Rust is by no means the first language to prevent missing bounds checks from becoming exploitable memory unsafety, as just one small example. All programs are exploitable; the objective is to limit the nature and scope of their exploitability.
- kaba0 4y agoJust because we can’t go 100% safe, we shouldn’t even try? That’s a logical fallacy right there.
- mort96 4y agoI'm not saying we shouldn't make safer languages. Rust is okay.