373 points · by ben201 · 7y ago · 124 comments
Project Zero has stuck to their 90 policy with everyone. They aren't picking on Apple, they've released unpatched bugs for most major vendors.
You may disagree with publication, but keep in mind this is a bug that may be known to some already. There are literally thousands of "private exploits" available for sale if you know where to look.
The 90 day policy forces companies to make their customers safer, and if not 90 days you'd still have to pick an arbitrary length of time but companies may take a longer deadline even less seriously and miss that too (and people would criticize that too).
The "additional bug" could just be a compromised update of any popular application available as a free download (see [1])? Then it is serious, because people download and run all kinds of applications from any website that seems useful to them.
[1]: https://en.wikipedia.org/wiki/Transmission_(BitTorrent_clien...
iOS is of course a very different story and some localhost macOS bugs might have parallels in iOS (not this one though).
Given the requirements that a secondary process should even be able to modify a file that is already open, I guess the expected behavior is that the 1st process's version should remain cached in memory while allowing the on-disk (CoW) version to be updated? While also informing the 1st process of the update and allowing the 1st process to reload/reopen the file if it chooses to do so. If this is the intended/expected behavior, then it follows that pwrite() and other syscalls should inform the kernel and cause prevent the origional cache from being flushed.
Wouldn't the issue be the change on disk in the first place ?
If I've understood correctly, I think it works something like this:
A privileged process needs to use some shared-object/library, and the OS loads that file into memory for it.
An unprivileged process creates an exact duplicate of the library file and asks the OS to load that into memory. This triggers the copy-on-write system to realize that these are identical, and creates a link between them so that both processes are using the same chunk of memory.
The privileged process then doesn't actually use the library for a while, so the OS pages it out of memory, while keeping that copy-on-write link around.
This is where the sneaky/buggy part lies, in that it's possible for the unprivileged process to modify its version of the library file without the copy-on-write system being informed of the write (and thus separating the two diverging copies). This is apparently related to some details of how mounting filesystem images works.
The next time the privileged process tries to use the library, the OS sees that it has already been paged out, but hey here's this copy-on-write link pointing at this "identical" version over here, and loads the poisoned version into the privileged process.
but with file mapped pages this is going to be a bit weird because the processes with a file page mapped MAP_SHARED should see others modifications of a MAP_SHARED page and presumably now when process modifies a file mapped page that is marked read only the kernel now has to update all the other processes to point at this new writable page. i think it is easy to modify the current process's page table, not sure how easy it is to modify other process's view of the page table. though, maybe the kernel wouldn't let you RPC a MAP_SHARED mmap. maybe it would only let you do it with a MAP_PRIVATE mmap.
Also, why isn't this a problem in Linux or BSD?
Are they giving any reasons for the delay?
90d seems like sufficient time for many processes, particularly if you're used to iterating in somewhat flexible or always-releasable environments, but as soon as you start involving multiple systems with different timetables, the time requirements to meet everyone's process needs can balloon, particularly if it's something requiring substantial changes (and thus, substantial testing).
(I'm in favor of the default 90d disclosure policy, just wanted to point out that there are sometimes legitimate justifications for longer timelines.)
(Work for elgooG, not on anything remotely related to GPZ, opinions my own, etc.)
Exceptional case. Deadline WAS extended. Reported 01. Jun 2017, Disclosed Jan 2018
https://bugs.chromium.org/p/project-zero/issues/detail?id=12...
Say what you want about Google, but groups like Project Zero and Talos from Cisco are awesome. The things they find...
(Meaning, is this about CoW in general or about memory management related to mounted images?)
Is 90 days enough to fully fix for example spectre and meltdown? I'm not sure all bugs can be fixed in 90 days. Some will take decades to resolve.
https://googleprojectzero.blogspot.com/2015/02/feedback-and-...
Privately disclosed to Apple, 90 days later they published. Simple as that.
Some bugs may take longer than that to fix. I still don't think it's an unreasonable question to ask.
https://ics-cert.us-cert.gov/ICS-CERT-Vulnerability-Disclosu...
Google is being more than generous, doubling to 90 days.