Skip to content

CVE-2020-4788: Speculation on incompletely validated data on IBM Power9

Daniel Axtens stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8powerpc/64s: Define MASKABLE_RELON_EXCEPTION_PSERIES_OOLarch/powerpc/include/asm/exception-64s.h+6 -00 replies
2/8powerpc/64s: move some exception handlers out of linearch/powerpc/kernel/exceptions-64s.S+90 -480 replies
3/8powerpc/64s: flush L1D on kernel entryDocumentation/kernel-parameters.txt arch/powerpc/include/asm/exception-64s.h arch/powerpc/include/asm/feature-fixups.h +8 more+199 -10 replies
4/8powerpc: Add a framework for user access trackingarch/powerpc/include/asm/futex.h arch/powerpc/include/asm/kup.h arch/powerpc/include/asm/uaccess.h +1 more+74 -80 replies
5/8powerpc: Implement user_access_begin and friendsarch/powerpc/include/asm/uaccess.h+46 -140 replies
6/8powerpc: Fix __clear_user() with KUAP enabledarch/powerpc/include/asm/uaccess.h arch/powerpc/kernel/ppc_ksyms.c arch/powerpc/lib/string.S +1 more+13 -50 replies
7/8powerpc/uaccess: Evaluate macro arguments once, before user access is allowedarch/powerpc/include/asm/uaccess.h+35 -140 replies
8/8powerpc/64s: flush L1D after user accessesDocumentation/kernel-parameters.txt arch/powerpc/include/asm/book3s/64/kup-radix.h arch/powerpc/include/asm/feature-fixups.h +10 more+224 -610 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 4.4 0/8] CVE-2020-4788: Speculation on incompletely validated data on IBM Power9

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 (2):
powerpc/64s: Define MASKABLE_RELON_EXCEPTION_PSERIES_OOL 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

 Documentation/kernel-parameters.txt           |   7 +
 .../powerpc/include/asm/book3s/64/kup-radix.h |  23 ++
 arch/powerpc/include/asm/exception-64s.h      |  15 +-
 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            | 142 +++++++++---
 arch/powerpc/kernel/exceptions-64s.S          | 210 +++++++++++-------
 arch/powerpc/kernel/ppc_ksyms.c               |  10 +
 arch/powerpc/kernel/setup_64.c                | 138 ++++++++++++
 arch/powerpc/kernel/vmlinux.lds.S             |  14 ++
 arch/powerpc/lib/checksum_wrappers_64.c       |   4 +
 arch/powerpc/lib/feature-fixups.c             | 104 +++++++++
 arch/powerpc/lib/string.S                     |   2 +-
 arch/powerpc/lib/string_64.S                  |   4 +-
 arch/powerpc/platforms/powernv/setup.c        |  15 ++
 arch/powerpc/platforms/pseries/setup.c        |   8 +
 19 files changed, 653 insertions(+), 117 deletions(-)
 create mode 100644 arch/powerpc/include/asm/book3s/64/kup-radix.h
 create mode 100644 arch/powerpc/include/asm/kup.h
Signature · 1 line
2.25.1