stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.19 0/7] CVE-2020-4788: Speculation on incompletely validated data on IBM Power9
@ 2020-11-19 23:41 Daniel Axtens
  2020-11-19 23:41 ` [PATCH 4.19 1/7] powerpc/64s: move some exception handlers out of line Daniel Axtens
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Daniel Axtens @ 2020-11-19 23:41 UTC (permalink / raw)
  To: stable; +Cc: dja

IBM Power9 processors can speculatively operate on data in the L1
cache before it has been completely validated, via a way-prediction
mechanism. It is not possible for an attacker to determine the
contents of impermissible memory using this method, since these
systems implement a combination of hardware and software security
measures to prevent scenarios where protected data could be leaked.

However these measures don't address the scenario where an attacker
induces the operating system to speculatively execute instructions
using data that the attacker controls. This can be used for example to
speculatively bypass "kernel user access prevention" techniques, as
discovered by Anthony Steinhauser of Google's Safeside Project. This
is not an attack by itself, but there is a possibility it could be
used in conjunction with side-channels or other weaknesses in the
privileged code to construct an attack.

This issue can be mitigated by flushing the L1 cache between privilege
boundaries of concern. This series flushes the cache on kernel entry and
after kernel user accesses.

Thanks to Nick Piggin, Russell Currey, Christopher M. Riedl, Michael
Ellerman and Spoorthy S for their work in developing, optimising,
testing and backporting these fixes, and to the many others who helped
behind the scenes.

Andrew Donnellan (1):
  powerpc: Fix __clear_user() with KUAP enabled

Christophe Leroy (2):
  powerpc: Add a framework for user access tracking
  powerpc: Implement user_access_begin and friends

Daniel Axtens (1):
  powerpc/64s: move some exception handlers out of line

Nicholas Piggin (3):
  powerpc/64s: flush L1D on kernel entry
  powerpc/uaccess: Evaluate macro arguments once, before user access is
    allowed
  powerpc/64s: flush L1D after user accesses

 .../admin-guide/kernel-parameters.txt         |   7 +
 .../powerpc/include/asm/book3s/64/kup-radix.h |  22 +++
 arch/powerpc/include/asm/exception-64s.h      |   9 +-
 arch/powerpc/include/asm/feature-fixups.h     |  19 +++
 arch/powerpc/include/asm/futex.h              |   4 +
 arch/powerpc/include/asm/kup.h                |  40 +++++
 arch/powerpc/include/asm/security_features.h  |   7 +
 arch/powerpc/include/asm/setup.h              |   4 +
 arch/powerpc/include/asm/uaccess.h            | 147 ++++++++++++++----
 arch/powerpc/kernel/exceptions-64s.S          |  96 +++++++-----
 arch/powerpc/kernel/setup_64.c                | 122 ++++++++++++++-
 arch/powerpc/kernel/vmlinux.lds.S             |  14 ++
 arch/powerpc/lib/checksum_wrappers.c          |   4 +
 arch/powerpc/lib/feature-fixups.c             | 104 +++++++++++++
 arch/powerpc/lib/string_32.S                  |   4 +-
 arch/powerpc/lib/string_64.S                  |   6 +-
 arch/powerpc/platforms/powernv/setup.c        |  17 ++
 arch/powerpc/platforms/pseries/setup.c        |   8 +
 18 files changed, 553 insertions(+), 81 deletions(-)
 create mode 100644 arch/powerpc/include/asm/book3s/64/kup-radix.h
 create mode 100644 arch/powerpc/include/asm/kup.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-19 23:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 23:41 [PATCH 4.19 0/7] CVE-2020-4788: Speculation on incompletely validated data on IBM Power9 Daniel Axtens
2020-11-19 23:41 ` [PATCH 4.19 1/7] powerpc/64s: move some exception handlers out of line Daniel Axtens
2020-11-19 23:41 ` [PATCH 4.19 2/7] powerpc/64s: flush L1D on kernel entry Daniel Axtens
2020-11-19 23:41 ` [PATCH 4.19 3/7] powerpc: Add a framework for user access tracking Daniel Axtens
2020-11-19 23:42 ` [PATCH 4.19 4/7] powerpc: Implement user_access_begin and friends Daniel Axtens
2020-11-19 23:42 ` [PATCH 4.19 5/7] powerpc: Fix __clear_user() with KUAP enabled Daniel Axtens
2020-11-19 23:42 ` [PATCH 4.19 6/7] powerpc/uaccess: Evaluate macro arguments once, before user access is allowed Daniel Axtens
2020-11-19 23:42 ` [PATCH 4.19 7/7] powerpc/64s: flush L1D after user accesses Daniel Axtens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).