4 ms·
Is the implication here that Apple doesn't value memory-safety? Why would you say that? Presumably because they also said > iOS is hundreds of millions of lin
by Silhouette 5y ago
Is the implication here that Apple doesn't value memory-safety? Why would you say that?
Presumably because they also said
> iOS is hundreds of millions of lines of C and C++
and Apple did write a whole new operating system that way not so long ago despite the well-known safety issues of doing so. If any company in the world has the resources to incrementally rewrite an entire operating system with huge numbers of active users today so that the attack surface becomes progressively smaller, it's Apple.
- saagarjha 5y agoWhat new operating system has Apple written recently?
- Silhouette 5y agoiOS. I realise it feels like smartphones have been ubiquitous forever, but iOS is actually only 14 years old (and obviously most of the code in it is far younger). It's not as if no-one knew about the dangers of writing security-sensitive systems in C or C++ in 2007 or as if the Internet was some new idea where no-one understood that bad people would try to remotely compromise your system using it. Apple might not yet have realised how important the iPhone was going to become back then but they were doing very well by a decade ago and they were huge by five years ago.
- saagarjha 5y agoiOS reuses the XNU kernel from macOS, so most of its code is far older than that. And even in 2007, what good options were there for writing kernels? Most of the attempts in memory-safe languages were just toys.
- why_only_15 5y agoI believe (unsure about this) that it reused a reasonable amount of userspace macOS code as well, perhaps to do fonts and the like? i have to imagine most of e.g. webkit was also taken from macos.
- saagarjha 5y agoIf it wasn’t true when iOS was launched, it’s certainly true now.
- pjmlp 5y agoApparently the NEWP toy used by Unisys to write their high secure profile OS is an aging grandpa language from 1961. Multics had a DoD validated security profile higher than any UNIX, it was written in Acme Corporation PL/I. The original Mac OS and Lisa were written in Fluffy Object Pascal. Apparently many airplanes get to fly in a toy language created around 1983. ....
- Silhouette 5y agoRight, but it's not 2007 any more. Apple has more technical and financial resources available to it than many small countries. Memory-safe languages aren't toys now. Even if they still were, Apple could have built a better one from scratch. Maybe in 2007 it made sense to build iOS on an existing platform and use the normal systems programming languages. Why couldn't more recent development of potentially vulnerable components have been done using safer technologies though? Take a look at the long list of security issues fixed by last week's iOS 14.7 update[1] and tell me how many of the vulnerable systems could have been written or rewritten to use more secure technologies. Look for terms like "use-after-free", "buffer overflow" and "out-of-bounds read". Then there is the iOS 14.7.1 update we're discussing today. Yet again this seems to be about fixing a memory corruption issue in a kernel extension written in an unsafe language that has a track record of exposing vulnerabilities. When do we start learning from those mistakes? [1] https://www.cybernewsgroup.co.uk/apple-issues-urgent-iphone-updates-nothing-for-pegasus-zero-day/ https://www.cybernewsgroup.co.uk/apple-issues-urgent-iphone-...
- deleted 5y ago[deleted]
- dev_tty01 5y agoiOS was a stripped down MacOS. It has evolved since then, but that was the core and much of the user space code. All of that came from NextStep which was based on the Mach kernel and BSD from the late 80s. So, no Apple did not write a whole new operating system in this millenium.
- Silhouette 5y agoFair enough, it's true that they didn't start from scratch, but iOS today has evolved far beyond those original borrowed elements and is now much more than just a kernel and some early shared user space code. Even if that were not the case, it is still surprising that a company with Apple's resources would continue to favour writing new parts of iOS the same way 14 years after its first release.