4 ms·
Is the implication here that Apple doesn't value memory-safety? Why would you say that? Apple have created and embraced an entire language (Swift) around the i
by zacwest 5y ago
Is the implication here that Apple doesn't value memory-safety? Why would you say that?
Apple have created and embraced an entire language (Swift) around the idea that things like memory safety are important, but you cannot just rewrite an entire operating system overnight into a new language.
- SheinhardtWigCo 5y agoI didn't say that. Their MacGyvered memory-safe iBoot implementation [1] shows that it's at least a consideration and that they're exploring ways to shore up vulnerable components. Swift is not (currently) a viable replacement for C. I'm not saying they should rewrite the entire OS immediately, but: given the pace at which they're able to pump out new marketable features; the massive deployed base of iOS devices; and the sensitivity of the data that is kept on those devices, I would argue that they damn well better have a long-term plan to replace their bug-ridden kernel and other important low-level systems, with code that isn't vulnerable to classes of bugs that have been solved for decades and are frequently exploited in the wild. And I'm not just talking about Apple here. [1] https://support.apple.com/guide/security/memory-safe-iboot-implementation-sec30d8d9ec1/web https://support.apple.com/guide/security/memory-safe-iboot-i...
- danieldk 5y agothey damn well better have a long-term plan to replace their bug-ridden kernel and other important low-level systems I think they are slowly going in that direction, e.g. by moving drivers to user space with DriverKit (which AFAIK unfortunately, still uses C++).
- stefan_ 5y agoClearly they don't care enough to force their own employees to use it, which is how we got the absolute utter crap that is a proprietary 802.11 protocol implementation in the kernel and the endless streams of ObjectiveC userland exploits.
- Silhouette 5y agoIs 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.