'Kernel memory leaking' Intel processor design flaw forces Linux, Windows redesign Other OSes will n - Security update fucks intel systems under 10 years

Kernel-memory-leaking Intel processor design flaw forces Linux, Windows redesign
Performance hits loom, other OSes need fixes.

A fundamental design flaw in Intel's processor chips has forced a significant redesign of the Linux and Windows kernels to defang the chip-level security bug.

Programmers are scrambling to overhaul the open-source Linux kernel's virtual memory system. Meanwhile, Microsoft is expected to publicly introduce the necessary changes to its Windows operating system in an upcoming Patch Tuesday: these changes were seeded to beta testers running fast-ring Windows Insider builds in November and December.

Crucially, these updates to both Linux and Windows will incur a performance hit on Intel products. The effects are still being benchmarked, however we're looking at a ballpark figure of five to 30 per cent slow down, depending on the task and the processor model. More recent Intel chips have features – such as PCID – to reduce the performance hit. Your mileage may vary.



Similar operating systems, such as Apple's 64-bit macOS, will also need to be updated – the flaw is in the Intel x86-64 hardware, and it appears a microcode update can't address it. It has to be fixed in software at the OS level, or go buy a new processor without the design blunder.

Details of the vulnerability within Intel's silicon are under wraps: an embargo on the specifics is due to lift early this month, perhaps in time for Microsoft's Patch Tuesday next week. Indeed, patches for the Linux kernel are available for all to see but comments in the source code have been redacted to obfuscate the issue.

However, some details of the flaw have surfaced, and so this is what we know.

Impact
It is understood the bug is present in modern Intel processors produced in the past decade. It allows normal user programs – from database applications to JavaScript in web browsers – to discern to some extent the layout or contents of protected kernel memory areas.

The fix is to separate the kernel's memory completely from user processes using what's called Kernel Page Table Isolation, or KPTI. At one point, Forcefully Unmap Complete Kernel With Interrupt Trampolines, aka FUCKWIT, was mulled by the Linux kernel team, giving you an idea of how annoying this has been for the developers.

Whenever a running program needs to do anything useful – such as write to a file or open a network connection – it has to temporarily hand control of the processor to the kernel to carry out the job. To make the transition from user mode to kernel mode and back to user mode as fast and efficient as possible, the kernel is present in all processes' virtual memory address spaces, although it is invisible to these programs. When the kernel is needed, the program makes a system call, the processor switches to kernel mode and enters the kernel. When it is done, the CPU is told to switch back to user mode, and reenter the process. While in user mode, the kernel's code and data remains out of sight but present in the process's page tables.

Think of the kernel as God sitting on a cloud, looking down on Earth. It's there, and no normal being can see it, yet they can pray to it.

These KPTI patches move the kernel into a completely separate address space, so it's not just invisible to a running process, it's not even there at all. Really, this shouldn't be needed, but clearly there is a flaw in Intel's silicon that allows kernel access protections to be bypassed in some way.

The downside to this separation is that it is relatively expensive, time wise, to keep switching between two separate address spaces for every system call and for every interrupt from the hardware. These context switches do not happen instantly, and they force the processor to dump cached data and reload information from memory. This increases the kernel's overhead, and slows down the computer.

Your Intel-powered machine will run slower as a result.

How can this security hole be abused?
At best, the vulnerability could be leveraged by malware and hackers to more easily exploit other security bugs.

At worst, the hole could be abused by programs and logged-in users to read the contents of the kernel's memory. Suffice to say, this is not great. The kernel's memory space is hidden from user processes and programs because it may contain all sorts of secrets, such as passwords, login keys, files cached from disk, and so on. Imagine a piece of JavaScript running in a browser, or malicious software running on a shared public cloud server, able to sniff sensitive kernel-protected data.

Specifically, in terms of the best-case scenario, it is possible the bug could be abused to defeat KASLR: kernel address space layout randomization. This is a defense mechanism used by various operating systems to place components of the kernel in randomized locations in virtual memory. This mechanism can thwart attempts to abuse other bugs within the kernel: typically, exploit code – particularly return-oriented programming exploits – relies on reusing computer instructions in known locations in memory.

If you randomize the placing of the kernel's code in memory, exploits can't find the internal gadgets they need to fully compromise a system. The processor flaw could be potentially exploited to figure out where in memory the kernel has positioned its data and code, hence the flurry of software patching.

However, it may be that the vulnerability in Intel's chips is worse than the above mitigation bypass. In an email to the Linux kernel mailing list over Christmas, AMD said it is not affected. The wording of that message, though, rather gives the game away as to what the underlying cockup is:
AMD running a victory lap said:
AMD processors are not subject to the types of attacks that the kernel page table isolation feature protects against. The AMD microarchitecture does not allow memory references, including speculative references, that access higher privileged data when running in a lesser privileged mode when that access would result in a page fault.

A key word here is "speculative." Modern processors, like Intel's, perform speculative execution. In order to keep their internal pipelines primed with instructions to obey, the CPU cores try their best to guess what code is going to be run next, fetch it, and execute it.

It appears, from what AMD software engineer Tom Lendacky was suggesting above, that Intel's CPUs speculatively execute code potentially without performing security checks. It seems it may be possible to craft software in such a way that the processor starts executing an instruction that would normally be blocked – such as reading kernel memory from user mode – and completes that instruction before the privilege level check occurs.

That would allow ring-3-level user code to read ring-0-level kernel data. And that is not good.

The specifics of the vulnerability have yet to be confirmed, but consider this: the changes to Linux and Windows are significant and are being pushed out at high speed. That suggests it's more serious than a KASLR bypass.

Also, the updates to separate kernel and user address spaces on Linux are based on a set of fixes dubbed the KAISER patches, which were created by eggheads at Graz University of Technology in Austria. These boffins discovered [PDF] it was possible to defeat KASLR by extracting memory layout information from the kernel in a side-channel attack on the CPU's virtual memory system. The team proposed splitting kernel and user spaces to prevent this information leak, and their research sparked this round of patching.

Their work was reviewed by Anders Fogh, who wrote this interesting blog post in July. That article described his attempts to read kernel memory from user mode by abusing speculative execution. Although Fogh was unable to come up with any working proof-of-concept code, he noted:
Ander Fogh said:
My results demonstrate that speculative execution does indeed continue despite violations of the isolation between kernel mode and user mode.

It appears the KAISER work is related to Fogh's research, and as well as developing a practical means to break KASLR by abusing virtual memory layouts, the team may have somehow proved Fogh right – that speculative execution on Intel x86 chips can be exploited to access kernel memory.

Shared systems
The bug will impact big-name cloud computing environments including Amazon EC2, Microsoft Azure, and Google Compute Engine, said a software developer blogging as Python Sweetness in this heavily shared and tweeted article on Monday:
Python Sweetness (publication) said:
There is presently an embargoed security bug impacting apparently all contemporary [Intel] CPU architectures that implement virtual memory, requiring hardware changes to fully resolve. Urgent development of a software mitigation is being done in the open and recently landed in the Linux kernel, and a similar mitigation began appearing in NT kernels in November. In the worst case the software fix causes huge slowdowns in typical workloads.

There are hints the attack impacts common virtualisation environments including Amazon EC2 and Google Compute Engine...

Microsoft's Azure cloud – which runs a lot of Linux as well as Windows – will undergo maintenance and reboots on January 10, presumably to roll out the above fixes.

Amazon Web Services also warned customers via email to expect a major security update to land on Friday this week, without going into details.

There were rumors of a severe hypervisor bug – possibly in Xen – doing the rounds at the end of 2017. It may be that this hardware flaw is that rumored bug: that hypervisors can be attacked via this kernel memory access cockup, and thus need to be patched, forcing a mass restart of guest virtual machines.

A spokesperson for Intel was not available for comment. ®

Updated to add
The Intel processor flaw is real. A PhD student at the systems and network security group at Vrije Universiteit Amsterdam has developed a proof-of-concept program that exploits the Chipzilla flaw to read kernel memory from user mode:



The Register has also seen proof-of-concept exploit code that leaks a tiny amount of kernel memory to user processes.

Finally, macOS has been patched to counter the chip design blunder since version 10.13.2, according to operating system kernel expert Alex Ionescu. And it appears 64-bit ARM Linux kernels will also get a set of KAISER patches, completely splitting the kernel and user spaces, to block attempts to defeat KASLR. We'll be following up this week.


Source: https://www.theregister.co.uk/2018/01/02/intel_cpu_design_flaw/
 
Last edited by a moderator:
All buttcoin is a rootkit. Uninstall all your cryptoshekels now.

Most actual Bitcoin is generated on specially designed machines (ASICs), which are integrated circuits specifically designed just to do one thing. While it's very likely there's enough money involved that someone tries to figure out how to (or successfully does) hijack them, any exploit is likely to be unique to the very specific architecture of the target(s) chosen by whoever does it.

Monero, though, is still practical to mine on CPUs to some degree, so compromising entire server farms is probably still a thing.
 
Exceptionally fucked

Also they knew about this for 6 months. 6 fucking months. Did they expect everyone to believe it would take the powers that be 6 months to concoct a fix? I can understand not wanting to highlight a big exploit while still implementing the fix, but holy crap this and the stock bailout by John Intel, CEO reeks of fucking consumers right in the ass.

Well the NSA probably has had all your info for the last 20 years anyway. And I'm sure that since this backdoor is now public, that now all PC backdoors are closed and the NSA will never spy on anyone ever again. Yay! :optimistic:
 
Most actual Bitcoin is generated on specially designed machines (ASICs), which are integrated circuits specifically designed just to do one thing. While it's very likely there's enough money involved that someone tries to figure out how to (or successfully does) hijack them, any exploit is likely to be unique to the very specific architecture of the target(s) chosen by whoever does it.

Monero, though, is still practical to mine on CPUs to some degree, so compromising entire server farms is probably still a thing.
ASIC computer? I hope it gets better. :feels:
 
Despite Windows, OS X and Linux being affected, TempleOS is perfectly fine.
upload_2018-1-4_0-15-29.png
 
Last edited:
A good breakdown of the two flaws outlined in this story:

  • Meltdown
    • This is the big bug reported on Tuesday.

    • It can be exploited by normal programs to read the contents of private kernel memory.

    • It affects potentially all out-of-order execution Intel processorssince 1995, except Itanium and pre-2013 Atoms. It definitely affects out-of-order x86-64 Intel CPUs since 2011. There are workaround patches to kill off this vulnerability available now for Windows, and for Linux. Apple's macOS has been patched since version 10.13.2. Installing and enabling the latest updates for your OS should bring in the fixes. You should go for it. If you're a Windows Insider user, you're likely already patched. Windows Server admins must enable the kernel-user space splitting feature once it is installed; it's not on by default.

    • Amazon has updated its AWS Linux guest kernels to protect customers against Meltdown. Google recommends its cloud users apply necessary patches and reboot their virtual machines. Microsoft is deploying fixes to Azure. If you're using a public cloud provider, check them out for security updates.

    • The workarounds move the operating system kernel into a separate virtual memory space. On Linux, this is known as Kernel Page Table Isolation, or KPTI, and it can be enabled or disabled during boot up. You may experience a performance hit, depending on your processor model and the type of software you are running. If you are a casual desktop user or gamer, you shouldn't notice. If you are hitting storage, slamming the network, or just making a lot of rapid-fire kernel system calls, you will notice a slowdown. Your mileage may vary.

    • It also affects Arm Cortex-A75 cores, which aren't available yet. Qualcomm's upcoming Snapdragon 845 is an example part that uses the A75. There are Linux kernel KPTI patches available to mitigate this. The performance hit isn't known, but expected to be minimal.

    • Additionally, Cortex-A15, Cortex-A57 and Cortex-A72 cores suffer from a variant of Meltdown: protected system registers can be accessed, rather than kernel memory, by user processes. Arm has a detailed white paper and product table, here, describing all its vulnerable cores, the risks, and mitigations.

    • Meltdown does not affect any AMD processors.

    • Googlers confirmed an Intel Haswell Xeon CPU would allow a normal user program to read kernel memory.

    • It was discovered and reported by three independent teams: Jann Horn (Google Project Zero); Werner Haas, Thomas Prescher (Cyberus Technology); and Daniel Gruss, Moritz Lipp, Stefan Mangard, Michael Schwarz (Graz University of Technology).

  • Spectre
    • Spectre allows, among other things, user-mode applications to extract information from other processes running on the same system. Alternatively, it can be used by code to extract information from its own process. Imagine malicious JavaScript in a webpage churning away using Spectre bugs to extract login cookies for other sites from the browser's memory.

    • It is a very messy vulnerability that is hard to patch, but is also tricky to exploit. It's hard to patch because just installing the aforementioned KPTI features is pointless on most platforms – you must recompile your software with countermeasures to avoid it being attacked by other programs, or wait for a chipset microcode upgrade. There are no solid Spectre fixes available yet for Intel and AMD parts.

    • In terms of Intel, Googlers have found that Haswell Xeon CPUs allow user processes to access arbitrary memory; the proof-of-concept worked just within one process, though. More importantly, the Haswell Xeon also allowed a user-mode program to read kernel memory within a 4GB range on a standard Linux install.

    • This is where it gets really icky. It is possible for an administrative user within a guest virtual machine on KVM to read the host server's kernel memory in certain conditions. According to Google:

      "When running with root privileges inside a KVM guest created using virt-manager on the Intel Haswell Xeon CPU, with a specific (now outdated) version of Debian's distro kernel running on the host, can read host kernel memory at a rate of around 1500 bytes/second, with room for optimization. Before the attack can be performed, some initialization has to be performed that takes roughly between 10 and 30 minutes for a machine with 64GiB of RAM; the needed time should scale roughly linearly with the amount of host RAM."

      When running with root privileges inside a KVM guest created using virt-manager on the Intel Haswell Xeon CPU, with a specific (now outdated) version of Debian's distro kernel running on the host, can read host kernel memory at a rate of around 1500 bytes/second, with room for optimization. Before the attack can be performed, some initialization has to be performed that takes roughly between 10 and 30 minutes for a machine with 64GiB of RAM; the needed time should scale roughly linearly with the amount of host RAM.

    • AMD insists its processors are practically immune to Variant 2 Spectre attacks. As for Variant 1, you'll have to wait for microcode updates or recompile your software with forthcoming countermeasures described in the technical paper on the Spectre website.

    • The researchers say AMD's Ryzen family is affected by Spectre. Googlers have confirmed AMD FX and AMD Pro cores can allow arbitrary data to be obtained by a user process; the proof-of-concept worked just within one process, though. An AMD Pro running Linux in a non-default configuration – the BPF JIT is enabled – also lets a normal user process read from 4GB of kernel virtual memory.

    • For Arm, Cortex-R7, Cortex-R8, Cortex-A8, Cortex-A9, Cortex-A15, Cortex-A17, Cortex-A57, Cortex-A72, Cortex-A73, and Cortex-A75 cores are affected by Spectre. Bear in mind Cortex-R series cores are for very specific and tightly controlled embedded environments, and are super unlikely to run untrusted code. To patch for Arm, apply the aforementioned KPTI fixes to your kernel, and/or recompile your code with new defenses described in the above-linked white paper.

    • Googlers were able to test that an Arm Cortex-A57 was able to be exploited to read arbitrary data from memory via cache sniffing; the proof-of-concept worked just within one process, though. Google is confident ARM-powered Android devices running the latest security updates are protected due to measures to thwart exploitation attempts – specifically, access to high-precision timers needed in attacks is restricted. Further security patches, mitigations and updates for Google's products– including Chrome and ChromeOS – are listed here.

    • Discovered and reported by these separate teams: Jann Horn (Google Project Zero); and Paul Kocher in collaboration with, in alphabetical order, Daniel Genkin (University of Pennsylvania and University of Maryland), Mike Hamburg (Rambus), Moritz Lipp (Graz University of Technology), and Yuval Yarom (University of Adelaide and Data61).

And, as a rebuttal to The Register accused of being hysterical...
The Register said:
Finally, if you are of the opinion that us media types are being hysterical about this design blunder, check this out: CERT recommends throwing away your CPU and buying an non-vulnerable one to truly fix the issue.
 
The funny thing about the media focus on these speculative exploits is that if you can get any kind of access to a system at all, you can usually turn it into access to everything. It's not exploiting shit that requires intense knowledge of higher math combined with being able to write assembly code in your mind, it's just fucking around until you get it all.
 
The funny thing about the media focus on these speculative exploits is that if you can get any kind of access to a system at all, you can usually turn it into access to everything. It's not exploiting shit that requires intense knowledge of higher math combined with being able to write assembly code in your mind, it's just fucking around until you get it all.
The Intel bug is especially heinous since Meltdown gives hackers access to MINIX, an operating system contained within Intel processors (which we only found out about recently). They could quite literally install a rootkit into your processor that you can't get rid of and wouldn't even know to do so.
 
AMD FTW

To check:
SYSTEMINFO in command prompt
also right clicking on "my computer/PC".

I have AMD. I never really bothered to check. But I did now. My computer is outdated garbage and I guess every little thing helps.
 
  • Feels
Reactions: The Fool
The Intel bug is especially heinous since Meltdown gives hackers access to MINIX, an operating system contained within Intel processors (which we only found out about recently). They could quite literally install a rootkit into your processor that you can't get rid of and wouldn't even know to do so.

Hasn't MINIX existed since the '80s?
 
Hasn't MINIX existed since the '80s?
Not inside of Intel processors. That's only been a thing since 2008. Thing is, we only found out about it in May of last year.

To clarify, I'm saying that it's like your processor has a tiny hard drive in it, running MINIX, and only the processor is supposed to have access to it. Unencrypted data is constantly running through it. It's a perfect target for Meltdown.
 
So a big question is since this is an architectural issue, when are CPUs down the pipleine that won't be vulnerable without software patching. The R&D lead-in time is suggesting not for quite a while.
 
There are workaround patches to kill off this vulnerability available now for Windows

Don't you just love how this update isn't available for Windows 7? You have to upgrade to Witless 10 before you're eligible to get it.

Do AMD CPUs use the same chipsets as Intel CPUs or do I have to get a whole new motherboard? If so, laptop users are fucked.
 
Don't you just love how this update isn't available for Windows 7? You have to upgrade to Witless 10 before you're eligible to get it.

Do AMD CPUs use the same chipsets as Intel CPUs or do I have to get a whole new motherboard? If so, laptop users are fucked.

So all the pirated chink CPUs will remain vulnerable.
 
Don't you just love how this update isn't available for Windows 7? You have to upgrade to Witless 10 before you're eligible to get it.

Do AMD CPUs use the same chipsets as Intel CPUs or do I have to get a whole new motherboard? If so, laptop users are fucked.
If you have an AMD CPU you are fine so long as you get your vulnerability to Spectre patched. It will cost no performance, but you will probably have to upgrade to Windows 10. PM me if you need help with doing so very cheaply.
 
Where did you read that? 7, 8 and 8.1 are supported until 2020.
Hmm.. Fool is correct, 7 and 8 are receiving the patches. I simply assumed Marvin wasn't mistaken given how salty he was.

I always upgrade to the new Windows OSes though, getting too used to something makes your technical aptitude wither away.
 
  • Agree
Reactions: The Fool
Back