12 ms·
macOS 11’s hidden security improvements
- comex 5y agoNote that, although it was published recently, this article covers macOS 11 (Big Sur) which released last year, not macOS 12 (Monterey) which is in beta.
- thepangolino 5y agoBut does it scan your pictures???
- Scoundreller 5y agoIt ingests but it doesn’t exhale.
- justinzollars 5y agoI feel absolutely violated by Apple. Privacy and Security are now words I would not associate with that brand.
- sillysaurusx 5y ago> NO_SMT disables Simultaneous multithreading (SMT), the CPU feature better known under Intel’s trade name of “Hyper-Threading”. SMT allows a CPU core to execute two or more threads at the same time, for improved performance at the cost of contention for per-core resources, such as caches, TLBs etc. > Letting multiple threads share invisible resources carries the risk of letting a malicious thread steal secrets from a “sibling” thread running on the same core—a risk that over the years has materialized into multiple attacks, like TLBleed, PortSmash, Fallout, ZombieLoad, RIDL. A straightforward mitigation for this entire family of attacks, past and future, is then to simply disable SMT, which is what NO_SMT does. BAHAHA cperciva was right! It’s a decade later and people care now! Linus didn’t care at the time! I’m on mobile otherwise I’d link to relevant refs, but it was an “I told you so” 10 years in the making. Maybe longer? When was cperciva’s cache stealing research?
- gregsadetsky 5y agoDiscussed here: https://news.ycombinator.com/item?id=16082909 https://news.ycombinator.com/item?id=16082909 cperciva's paper from 2005 (linked above): http://www.daemonology.net/papers/htt.pdf http://www.daemonology.net/papers/htt.pdf
- sillysaurusx 5y agoHmm. That commenter’s username seems familiar… Thanks. :) > The problems introduced by caches have been further exacerbated by the current trend towards increased parallelism. On recent processors implementing simultaneous multithreading [18], such as Intel’s “Hyper- Threading” processors [11], access to the L1 cache is shared between two independent instruction streams And here we are 16 years later, with NO_SMT. Neat. Perhaps my emotional outburst wasn’t substantive, but boy was it satisfying. I’ll try to restrain such urges in the future, but somehow I doubt a 16 year “told ya so” will pop up again any time soon. It’s half as old as I am. I wish I could remember Linus’ remark about cperciva’s attack being merely “theoretical.”
- gregsadetsky 5y agohttps://lkml.org/lkml/2005/5/16/152 https://lkml.org/lkml/2005/5/16/152 Linus: "[...] I'd be really surprised if somebody is actually able to get a real-world attack on a real-world pgp key usage or similar out of it (and as to the covert channel, nobody cares). It's a fairly interesting approach, but it's certainly neither new nor HT-specific, or necessarily seem all that worrying in real life. [...]"
- mzs 5y agoHow many years until this from last year is regretted? introduce memfd_secret system call to create "secret" memory areas v11: * Drop support for uncached mappings https://lwn.net/ml/linux-kernel/20201124092556.12009-1-rppt@kernel.org/ https://lwn.net/ml/linux-kernel/20201124092556.12009-1-rppt@...
- darwingr 5y agoBut can it ignore your firewall settings?
- azinman2 5y agoMy understanding is if you change firewall settings using PF let's you have total control, unlike network extensions.
- GekkePrutser 5y agoCorrect, though both layers remain active. The application-level firewall in the macOS GUI and the packet-based pf layer work on top of each other (I believe pf is on top of the application layer one but not 100% sure). So if you have the application firewall on, opening ports in pf won't help. I'm kinda surprised pf is still in there to be honest. I know some security solutions like McAfee Firewall use it under the hood. But they could do similar things with network extensions. I have expected them to drop it for years now.
- uniqueuid 5y agoI'd be interested to hear from someone with deep security knowledge: Some people have dismissed OpenBSD's mitigations as overhyped (i.e. - things like W^X are not the main problem, linux has long caught up, etc). But now we see Apple adding precisely some of these mitigations. Where does this leave such architectural countermeasures? Are there real gains from investing in such low-level things? Are they irrelevant in an age where many laptops still have ports that give direct DMA access, users are not savvy and sandboxes incomplete?
- comex 5y agoWhich mitigations exactly? macOS has enforced W^X in most cases for many years. As for the two mitigations mentioned in the article: NO_SMT seems to be equivalent to Linux's "core scheduling" feature, which landed recently [1]. This approach, involving disabling SMT (aka hyperthreading) for specific processes, is different from OpenBSD's more brute-force approach of disabling SMT systemwide; there are pros and cons to both approaches. As for the other one, forcing VERW to be executed on every return from the kernel, both Linux and OpenBSD chose the brute-force approach of doing this for all processes by default; both added this feature in 2019 as part of the coordinated disclosure of the MDS vulnerability class. Apple is instead doing it on a per-thread basis. Again, pros and cons. [1] https://lwn.net/Articles/861251/ https://lwn.net/Articles/861251/
- saagarjha 5y ago(To provide more context, before the new APIs Apple used to flip actual page memory protections, which required going through the kernel. The new SPRR APIs allow for essentially the same thing, except they work per-thread and just set a register accessible from userspace that essentially applies an extra mask on the permission bits, which is much faster.)
- fay59 5y agoIt’s clear that W^X isn’t “solving security”, but it’s not a bad idea just because it’s a low-hanging fruit. On Apple platforms, I think that it came to be as a natural consequence of the ability to toggle RX mappings to be RW without a syscall. Almost all DMA-capable peripherals on Apple Silicon (including iDevices) are gated behind an IOMMU.
- bangonkeyboard 5y agoVery hidden. The 11.5.2 patch from last week had no release notes (https://eclecticlight.co/2021/08/15/last-week-on-my-mac-trust-apple/ https://eclecticlight.co/2021/08/15/last-week-on-my-mac-trus...), and Apple replied to inquiries with "No further details on the Big Sur 11.5.2 update will be released" (https://twitter.com/ClassicII_MrMac/status/1425632779262431232 https://twitter.com/ClassicII_MrMac/status/14256327792624312...).
- tgsovlerkhgsel 5y agoIIRC it didn't just have no release notes, it explicitly claimed not to contain security patches. Although I may be misremembering or may have been misled by an ambiguous message. https://support.apple.com/en-us/HT201222 https://support.apple.com/en-us/HT201222 lists it as being a security update but "This update has no published CVE entries." (emphasis mine) implying some nasty but embargoed security issue.
- busymom0 5y agoI am an iOS and MacOS developer and have gotten my updates rejected for my release notes not being descriptive enough of what it changes. Yet Apple regularly gives exceptions to the big guys like Facebook, Uber etc apps and now themselves. Apple’s developer guidelines specifically warn developers to not put vague release notes but the rules often get partially applied.
- GekkePrutser 5y agoSounds good but a problem with Apple's latest releases are that a lot of its security features listen only to Apple and not to the user. This doesn't concern most of the improvements mentioned in the article, those are purely technical improvements at a very low level. But the signed system volume for example (also mentioned), while a good idea, lacks a convenient way for the user to make changes to it. I'm not very happy leaving my security to a black box and just trusting the supplier implicitly. This is a supplier that introduced a "get root with blank password" bug and the "your password hint is your actual password" one. Sure, everyone makes mistakes, especially for that reason I'd want to have more access than they offer now. macOS is becoming more and more like iOS, which is also way too closed in my opinion. More locks is always good but the user should have a key, not just the supplier.
- azinman2 5y agoYou can always disable CSR/SIP generally. macOS is unlike iOS in that many security mitigations can be disabled. The fact that new M1 Macs let you side load a diff non-Apple in iOS should be the ultimate proof you need of this motivation to allow user control on Macs.
- jchw 5y agoIf one mentions Android’s “openness” as a plus, people (rightly) point out that sure, it is technically open source and you can often sideload, but that doesn’t mean it is friendly towards those things necessarily. A lot of downsides come with rooting and bootloader unlocking after all. That is when comparing to iOS, which is more restrictive than macOS, as you point out. I mention this because I think that it’s good Apple lets you use some of the hardware you own with relatively little restriction if you so choose, but it is a lot less practical than the previous status quo and other systems. You definitely lose some functionality (on M1, I believe you lose at least iOS application support.) If we’re going to be frank about it with Android, I think it’s fair to be frank about it with macOS/M1. I would guess things could be better if user choice was as much of a focus as vendor control.
- 5y ago
- kccqzy 5y agoInteresting tidbit about Chrome using POSIX_SPAWN_NP_CSM_ALL now. But I would point out that according to the open-source Chromium code base, these CPU security mitigation APIs offer process-wide protection rather than thread-based protection (commit message at https://source.chromium.org/chromium/chromium/src/+/46e23c8166086ef63e7d383149d4c91f30b7415e https://source.chromium.org/chromium/chromium/src/+/46e23c81... ) Some more digging shows that Chrome started using a weaker version of CSM, TCSM (thread CSM I assume) two years ago in NaCl: https://source.chromium.org/chromium/_/chromium/native_client/src/native_client.git/+/4744a43b6fc4aaa5230541efad113b3cd86ea0f8 https://source.chromium.org/chromium/_/chromium/native_clien... Firefox of course uses TCSM too: https://hg.mozilla.org/mozilla-central/rev/cd1ccb74af7c https://hg.mozilla.org/mozilla-central/rev/cd1ccb74af7c And so does Safari: https://trac.webkit.org/changeset/244233/webkit https://trac.webkit.org/changeset/244233/webkit I hope this at least somewhat assuages the fears of people who prefer Firefox or Safari over Chrome.
- deleted 5y ago[deleted]
- saagarjha 5y ago> I’ve not seen anybody mention the fact that the cryptographically sealed filesystem underlying SSV is internally code-named “Cryptex”. Might as well mention it here: crytex is how you get code on the Security Research Device, rather than SSV.
- user3939382 5y agoThe security improvement I want is that when I run ‘ps ax’ on a fresh install, I have reduced attack surface instead of dozens of random daemons hardwired into launchd like the one for classrooms(??), iCloud and photo sharing even when those features are disabled, etc.
- walterbell 5y agoCan those daemons be deleted/renamed?
- saagarjha 5y agoNot with SIP engaged.
- yehaaa 5y agoWhy is it not possible to disable SIP, make the desired changes, compute a new seal, then enable SIP again?
- xgbi 5y agoBecause if you can do it, any rootkit will be able to do it too.
- yehaaa 5y agoBut you disable SIP while booted in recover mode. Somehow Apple needs to do this anytime the system is updated.
- Wowfunhappy 5y agoNo it can't. You'd have to disable SIP temporarily in the first place, and a rootkit can't boot a recovery environment while SIP is engaged. And then on Apple Silicon Macs, entering 1TR is tied to the physical action of holding down the power button.
- 5y ago
- faster 5y agoI was hoping the article would mention the recent "security improvement" that prevents daemons from using Bluetooth in Big Sur. I haven't seen anything from Apple (or anyone else) explaining how that improves security.
- throwawaymanbot 5y agoGotta be mass surveillance by the right people only. Don’t want anyone not authorized to do so!
- sesuximo 5y agoKinda sad to think future generations of Mac users won’t be able to write self modifying assembly. I feel like that’s a fun learning experience
- no_time 5y agoOn the other hand it prevents companies from using BS like vmprotect.
- masklinn 5y agoThat hasn't been a trivial option for a while, userland W^X (DEP) was implemented across the board >15 years ago. TFA seems to be confused about what Apple did with the M1, macOS has had W^X enabled across the board (for userland) on all supported 64b architectures since 10.5 (10.4 only had stack W^X).
- Toutouxc 5y agoCouldn't you just use a VM for stuff like that?
- beermonster 5y agoThis is a great write-up. Are Apple getting more secretive as I had heard they were trying to become more open regarding their security. This and not providing release notes [1]for 11.5.2 make me think otherwise https://eclecticlight.co/2021/08/15/last-week-on-my-mac-trus https://eclecticlight.co/2021/08/15/last-week-on-my-mac-trus