Afaik in general the Intels are affected by the Meltdown bug and all cpu's are affected by the Spectre bug. There is also a list on the Intel website with the unfortunate cpu's:Don't know if you already saw this article but AMD and Arm also seem to be affected, according to El Reg of course but they're usually right about these things.
How much money do Intel (and AMD) make from FreeBSD? How many FreeBSD (or *BSD in general) developers does Intel have on staff? I think the answer is: a little bit, and zero. For Linux the answer is: many billions of $, and thousands. That in and of itself is the core of the answer to your question.- why it was known to other OS vendors in July and FreeBSD made aware in late December?
They are very different. The general idea can be copied, but the implementation has to be wholly separate.- can FreeBSD just copy the technique went into Linux kernel a while ago? Do they differ a lot in this subject?
I am not sure that I'd trust all the javascripts and web workers that run on my browsers.But if only trustworthy people even run programs on my computer
From FreeBSD News Flash:
4 January: About the Meltdown and Spectre attacks: FreeBSD was made aware of the problems in late December 2017. We're working with CPU vendors and the published papers on these attacks to mitigate them on FreeBSD. Due to the fundamental nature of the attacks, no estimate is yet available for the publication date of patches.
I like this idea. It would break not only Meltdown, but Spectre, too.just mung the clock so that microsecond timing is not accurate anymore?
Are you sure? All cpu's with branch prediction are vulnerable for the Spectre variant. I think most of the cpu's in the last 20 years or so have that.I guess that I am fortunate to be running AMD on my Windows system and both of my FreeBSD systems. My OpenBSD system is not vulnerable to any of these exploits because it's a SPARC machine. Come to think of it, the two firewall machines are also AMD. I just hope that the *BSD developers do what was done in Linux...which is to check the CPU vendor before applying the fix.
No, the timing used here is much more accurate than microsecond timing; it's the CPU's internal cycle counters.Couldn't we just mung the clock so that microsecond timing is not accurate anymore?
Good question. Normal user-level code (things like awk, sed and grep, or analytics or data bases) don't measure timing of operations accurately, since they care to get work done, not so much how long the work takes. There are certainly micro-benchmarks that measure timing to microsecond level; for example doing performance studies of disk drives needs to be that accurate when dealing with SSDs. If those benchmarks average over long enough periods, they should be OK, since they operate on time differences, which eventually have to smooth out. So people would do precision benchmarks would notice that their measurements have much more variance, but the long-term average is still right.Imagine just rounding the HPET to millisecond and adding an incrementing value to keep it going up. It would certainly break these attacks!
What else would break by this approach?
You are right. But, the access to the RDTSC (read time stamp counter) instruction can be disabled, so that an attempt to read that results in an privilege exception.No, the timing used here is much more accurate than microsecond timing; it's the CPU's internal cycle counters.
And one can't just break the clock, because programs are capable of making their own clock.
Hmm. The examples you listed are typical for servers. These usually don't have to execute untrusted foreign code like browsers.Deliberately breaking timing could theoretically disrupt these techniques
That might be possible (I don't know whether it is, haven't checked). But I think it's impractical, because then one would have to fix every harmless application that uses this technique for measuring time. And I'm sure that 99.9% of those uses (perhaps 100%) are not malicious.You are right. But, the access to the RDTSC (read time stamp counter) instruction can be disabled, so that an attempt to read that results in an privilege exception.
Does there exist an option to disallow this instruction in user mode?
That is similar to Mozilla fix in Firefox 57.0.4 :How about this for a quick fix: All variants depend on accurate timing of events. Couldn't we just mung the clock so that microsecond timing is not accurate anymore?
Imagine just rounding the HPET to millisecond and adding an incrementing value to keep it going up. It would certainly break these attacks!
What else would break by this approach?
mozilla said:Since this new class of attacks involves measuring precise time intervals, as a partial, short-term, mitigation we are disabling or reducing the precision of several time sources in Firefox. The precision of performance.now() has been reduced from 5μs to 20μs, and the SharedArrayBuffer feature has been disabled because it can be used to construct a high-resolution timer.
SharedArrayBuffer is already disabled in Firefox 52 ESR