(FreeBSD Issues Fix for FreeBSD) Intel/AMD/ARM CPU Data Cache Race Conditions Let Local Users Read Arbitrary Virtual CPU Memory
SecurityTracker Alert ID: 1040528|
SecurityTracker URL: http://securitytracker.com/id/1040528
(Links to External Site)
Date: Mar 14 2018
Disclosure of system information|
Fix Available: Yes Vendor Confirmed: Yes Exploit Included: Yes |
Several vulnerabilities were reported in Intel, AMD, and ARM CPUs. A local user can read arbitrary virtual memory on the target CPU device. FreeBSD is affected.|
A local user can exploit race conditions in CPU data cache processing to obtain potentially sensitive information on the target system. This can be exploited to read arbitrary virtual memory on the target system, including by a local user on a guest operating system of a virtual machine to read arbitrary memory from other guest systems, the host operating system, and the hypervisor.
In certain cases, a local user can run a specially crafted application to exploit several flaws in the CPU speculative branch instruction execution feature and leverage CPU data cache timing behavior to infer information or read information from various CPU caches.
A local user that can trigger an out-of-bounds index error in an application can read data from another process from the CPU virtual memory [CVE-2017-5753]. The eBPF interpreter or the eBPF JIT engine can be used to create vulnerable code.
A local user can run specially crafted code to cause the CPU to speculatively execute an indirect branch to leak memory contents from another process into a CPU cache and then read the contents of the cache [CVE-2017-5715].
A local user can run specially crafted code to cause the CPU to read memory from a CPU cache before an asynchronous permission check occurs [CVE-2017-5754]. AMD CPUs are reportedly not affected.
The Intel Core, Xeon, Atom, Celeron, and Pentium product lines are affected.
CPUs from AMD and ARM are also affected.
CPUs from other vendors may also affected.
The CVE-2017-5753 and CVE-2017-5715 vulnerabilities are referred to as "Spectre".
The CVE-2017-5754 vulnerability is referred to as "Meltdown".
The original advisories are available at:
Paul Kocher, Daniel Genkin, Daniel Gruss, Werner Haas, Mike Hamburg, Moritz Lipp, Stefan Mangard, Thomas Prescher, Michael Schwarz, Yuval Yarom, Anders Fogh, Jann Horn, the Google Project Zero Team, and others reported these vulnerabilities.
A local user can view arbitrary virtual memory contents on the target CPU device [which can lead to elevated privileges on the target system].|
FreeBSD has issued a fix for CVE-2017-5715 and CVE-2017-5754.|
The FreeBSD advisory is available at:
Vendor URL: security.FreeBSD.org/advisories/FreeBSD-SA-18:03.speculative_execution.asc (Links to External Site)
Access control error, State error|
This archive entry is a follow-up to the message listed below.|
Source Message Contents
Subject: FreeBSD Security Advisory FreeBSD-SA-18:03.speculative_execution|
-----BEGIN PGP SIGNED MESSAGE-----
FreeBSD-SA-18:03.speculative_execution Security Advisory
The FreeBSD Project
Topic: Speculative Execution Vulnerabilities
Credits: Jann Horn (Google Project Zero); Werner Haas, Thomas
Prescher (Cyberus Technology); Daniel Gruss, Moritz Lipp,
Stefan Mangard, Michael Schwarz (Graz University of
Technology); Paul Kocher; Daniel Genkin (University of
Pennsylvania and University of Maryland), Mike Hamburg
(Rambus); Yuval Yarom (University of Adelaide and Data6)
Affects: All supported versions of FreeBSD.
Corrected: 2018-02-17 18:00:01 UTC (stable/11, 11.1-STABLE)
2018-03-14 04:00:00 UTC (releng/11.1, 11.1-RELEASE-p8)
CVE Name: CVE-2017-5715, CVE-2017-5754
Special Note: Speculative execution vulnerability mitigation is a work
in progress. This advisory addresses the most significant
issues for FreeBSD 11.1 on amd64 CPUs. We expect to update
this advisory to include 10.x for amd64 CPUs. Future FreeBSD
releases will address this issue on i386 and other CPUs.
freebsd-update will include changes on i386 as part of this
update due to common code changes shared between amd64 and
i386, however it contains no functional changes for i386 (in
particular, it does not mitigate the issue on i386).
For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:https://security.FreeBSD.org/>.
Many modern processors have implementation issues that allow unprivileged
attackers to bypass user-kernel or inter-process memory access restrictions
by exploiting speculative execution and shared resources (for example,
II. Problem Description
A number of issues relating to speculative execution were found last year
and publicly announced January 3rd. Two of these, known as Meltdown and
Spectre V2, are addressed here.
This issue relies on an affected CPU speculatively executing instructions
beyond a faulting instruction. When this happens, changes to architectural
state are not committed, but observable changes may be left in micro-
architectural state (for example, cache). This may be used to infer
CVE-2017-5715 (Spectre V2)
Spectre V2 uses branch target injection to speculatively execute kernel code
at an address under the control of an attacker.
An attacker may be able to read secret data from the kernel or from a
process when executing untrusted code (for example, in a web browser).
No workaround is available.
Perform one of the following:
1) Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date,
2) To update your vulnerable system via a binary patch:
Systems running a RELEASE version of FreeBSD on the i386 or amd64
platforms can be updated via the freebsd-update(8) utility, followed
by a reboot into the new kernel:
# freebsd-update fetch
# freebsd-update install
# shutdown -r now
3) To update your vulnerable system via a source code patch:
The following patches have been verified to apply to the applicable
FreeBSD release branches.
a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.
# fetch https://security.FreeBSD.org/patches/SA-18:03/speculative_execution-amd64-11.patch
# fetch https://security.FreeBSD.org/patches/SA-18:03/speculative_execution-amd64-11.patch.asc
# gpg --verify speculative_execution-amd64-11.patch.asc
b) Apply the patch. Execute the following commands as root:
# cd /usr/src
# patch < /path/to/patch
c) Recompile your kernel as described in
<URL:https://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the
VI. Correction details
The mitigation is known as Page Table Isolation (PTI). PTI largely separates
kernel and user mode page tables, so that even during speculative execution
most of the kernel's data is unmapped and not accessible.
A demonstration of the Meltdown vulnerability is available at
https://github.com/dag-erling/meltdown. A positive result is definitive
(that is, the vulnerability exists with certainty). A negative result
indicates either that the CPU is not affected, or that the test is not
capable of demonstrating the issue on the CPU (and may need to be modified).
A patched kernel will automatically enable PTI on Intel CPUs. The status can
be checked via the vm.pmap.pti sysctl:
# sysctl vm.pmap.pti
The default setting can be overridden by setting the loader tunable
vm.pmap.pti to 1 or 0 in /boot/loader.conf. This setting takes effect only
PTI introduces a performance regression. The observed performance loss is
significant in microbenchmarks of system call overhead, but is much smaller
for many real workloads.
CVE-2017-5715 (Spectre V2)
There are two common mitigations for Spectre V2. This patch includes a
mitigation using Indirect Branch Restricted Speculation, a feature available
via a microcode update from processor manufacturers. The alternate
mitigation, Retpoline, is a feature available in newer compilers. The
feasibility of applying Retpoline to stable branches and/or releases is under
The patch includes the IBRS mitigation for Spectre V2. To use the mitigation
the system must have an updated microcode; with older microcode a patched
kernel will function without the mitigation.
IBRS can be disabled via the hw.ibrs_disable sysctl (and tunable), and the
status can be checked via the hw.ibrs_active sysctl. IBRS may be enabled or
disabled at runtime. Additional detail on microcode updates will follow.
The following list contains the correction revision numbers for each
To see which files were modified by a particular revision, run the
following command, replacing NNNNNN with the revision number, on a
machine with Subversion installed:
# svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base
Or visit the following URL, replacing NNNNNN with the revision number:
The latest revision of this advisory is available at
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "email@example.com"
Go to the Top of This SecurityTracker Archive Page