# CVE-2021-47034: powerpc/64s: Fix pte update for kernel memory on radix

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.4
- **CVSS:** 4.4 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: High; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 7, 2026-11-26)
- **Published:** 2024-02-28T08:13:42.720Z
- **Modified:** 2026-06-17T04:16:15.533Z

## Who should check

- Anyone running Linux \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< b3d5d0983388d6c4fb35f7d722556d5595f167a7; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 73f9dccb29e4f82574bec2765c0090cdb0404301; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 84c0762633f2a7ac8399e6b97d3b9bb8e6e1d50f; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 01ac203e2119d8922126886ddea309fb676f955f; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< e40c52ee67b155ad59f59e73ea136d02685f0e0d; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< b8b2f37cf632434456182e9002d63cbc4cccc50c
- Anyone running Linux 4.18

## Description

In the Linux kernel, the following vulnerability has been resolved:

powerpc/64s: Fix pte update for kernel memory on radix

When adding a PTE a ptesync is needed to order the update of the PTE
with subsequent accesses otherwise a spurious fault may be raised.

radix\_\_set\_pte\_at() does not do this for performance gains. For
non-kernel memory this is not an issue as any faults of this kind are
corrected by the page fault handler. For kernel memory these faults
are not handled. The current solution is that there is a ptesync in
flush\_cache\_vmap() which should be called when mapping from the
vmalloc region.

However, map\_kernel\_page() does not call flush\_cache\_vmap(). This is
troublesome in particular for code patching with Strict RWX on radix.
In do\_patch\_instruction() the page frame that contains the instruction
to be patched is mapped and then immediately patched. With no ordering
or synchronization between setting up the PTE and writing to the page
it is possible for faults.

As the code patching is done using \_\_put\_user\_asm\_goto() the resulting
fault is obscured - but using a normal store instead it can be seen:

  BUG: Unable to handle kernel data access on write at 0xc008000008f24a3c
  Faulting instruction address: 0xc00000000008bd74
  Oops: Kernel access of bad area, sig: 11 \[\#1\]
  LE PAGE\_SIZE=64K MMU=Radix SMP NR\_CPUS=2048 NUMA PowerNV
  Modules linked in: nop\_module(PO+) \[last unloaded: nop\_module\]
  CPU: 4 PID: 757 Comm: sh Tainted: P           O      5.10.0-rc5-01361-ge3c1b78c8440-dirty \#43
  NIP:  c00000000008bd74 LR: c00000000008bd50 CTR: c000000000025810
  REGS: c000000016f634a0 TRAP: 0300   Tainted: P           O       (5.10.0-rc5-01361-ge3c1b78c8440-dirty)
  MSR:  9000000000009033 \<SF,HV,EE,ME,IR,DR,RI,LE\>  CR: 44002884  XER: 00000000
  CFAR: c00000000007c68c DAR: c008000008f24a3c DSISR: 42000000 IRQMASK: 1

This results in the kind of issue reported here:
  https://lore.kernel.org/linuxppc-dev/15AC5B0E-A221-4B8C-9039-FA96B8EF7C88@lca.pw/

Chris Riedl suggested a reliable way to reproduce the issue:
  $ mount -t debugfs none /sys/kernel/debug
  $ (while true; do echo function \> /sys/kernel/debug/tracing/current\_tracer ; echo nop \> /sys/kernel/debug/tracing/current\_tracer ; done) &

Turning ftrace on and off does a large amount of code patching which
in usually less then 5min will crash giving a trace like:

   ftrace-powerpc: (\_\_\_\_ptrval\_\_\_\_): replaced (4b473b11) != old (60000000)
   ------------\[ ftrace bug \]------------
   ftrace failed to modify
   \[\<c000000000bf8e5c\>\] napi\_busy\_loop+0xc/0x390
    actual:   11:3b:47:4b
   Setting ftrace call site to call ftrace function
   ftrace record flags: 80000001
    (1)
    expected tramp: c00000000006c96c
   ------------\[ cut here \]------------
   WARNING: CPU: 4 PID: 809 at kernel/trace/ftrace.c:2065 ftrace\_bug+0x28c/0x2e8
   Modules linked in: nop\_module(PO-) \[last unloaded: nop\_module\]
   CPU: 4 PID: 809 Comm: sh Tainted: P           O      5.10.0-rc5-01360-gf878ccaf250a \#1
   NIP:  c00000000024f334 LR: c00000000024f330 CTR: c0000000001a5af0
   REGS: c000000004c8b760 TRAP: 0700   Tainted: P           O       (5.10.0-rc5-01360-gf878ccaf250a)
   MSR:  900000000282b033 \<SF,HV,VEC,VSX,EE,FP,ME,IR,DR,RI,LE\>  CR: 28008848  XER: 20040000
   CFAR: c0000000001a9c98 IRQMASK: 0
   GPR00: c00000000024f330 c000000004c8b9f0 c000000002770600 0000000000000022
   GPR04: 00000000ffff7fff c000000004c8b6d0 0000000000000027 c0000007fe9bcdd8
   GPR08: 0000000000000023 ffffffffffffffd8 0000000000000027 c000000002613118
   GPR12: 0000000000008000 c0000007fffdca00 0000000000000000 0000000000000000
   GPR16: 0000000023ec37c5 0000000000000000 0000000000000000 0000000000000008
   GPR20: c000000004c8bc90 c0000000027a2d20 c000000004c8bcd0 c000000002612fe8
   GPR24: 0000000000000038 0000000000000030 0000000000000028 0000000000000020
   GPR28: c000000000ff1b68 c000000000bf8e5c c00000000312f700 c000000000fbb9b0
   NIP ftrace\_bug+0x28c/0x2e8
   LR  ftrace\_bug+0x288/0x2e8
   Call T
---truncated---

## Affected and fixed versions

- Linux: \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< b3d5d0983388d6c4fb35f7d722556d5595f167a7; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 73f9dccb29e4f82574bec2765c0090cdb0404301; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 84c0762633f2a7ac8399e6b97d3b9bb8e6e1d50f; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 01ac203e2119d8922126886ddea309fb676f955f; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< e40c52ee67b155ad59f59e73ea136d02685f0e0d; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< b8b2f37cf632434456182e9002d63cbc4cccc50c (cvelist)
- Linux: 4.18 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47034. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47034.md
Affected: Linux >= f1cb8f9beba8699dd1b4518418191499e53f7b17, < b3d5d0983388d6c4fb35f7d722556d5595f167a7; >= f1cb8f9beba8699dd1b4518418191499e53f7b17, < 73f9dccb29e4f82574bec2765c0090cdb0404301; >= f1cb8f9beba8699dd1b4518418191499e53f7b17, < 84c0762633f2a7ac8399e6b97d3b9bb8e6e1d50f; >= f1cb8f9beba8699dd1b4518…
Fixed in: Linux 73f9dccb29e4f82574bec2765c0090cdb0404301, Linux 84c0762633f2a7ac8399e6b97d3b9bb8e6e1d50f, Linux 01ac203e2119d8922126886ddea309fb676f955f

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47034 being exploited?

There is no confirmed exploitation: CVE-2021-47034 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47034?

Medium: CVSS 4.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47034?

Linux \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< b3d5d0983388d6c4fb35f7d722556d5595f167a7; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 73f9dccb29e4f82574bec2765c0090cdb0404301; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 84c0762633f2a7ac8399e6b97d3b9bb8e6e1d50f; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< 01ac203e2119d8922126886ddea309fb676f955f; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< e40c52ee67b155ad59f59e73ea136d02685f0e0d; \>= f1cb8f9beba8699dd1b4518418191499e53f7b17, \< b8b2f37cf632434456182e9002d63cbc4cccc50c; Linux 4.18.

### Is there a fix for CVE-2021-47034?

Yes. Fixed in Linux 73f9dccb29e4f82574bec2765c0090cdb0404301, Linux 84c0762633f2a7ac8399e6b97d3b9bb8e6e1d50f, Linux 01ac203e2119d8922126886ddea309fb676f955f. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-47034?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/b3d5d0983388d6c4fb35f7d722556d5595f167a7>
- patch: <https://git.kernel.org/stable/c/73f9dccb29e4f82574bec2765c0090cdb0404301>
- patch: <https://git.kernel.org/stable/c/84c0762633f2a7ac8399e6b97d3b9bb8e6e1d50f>
- patch: <https://git.kernel.org/stable/c/01ac203e2119d8922126886ddea309fb676f955f>
- patch: <https://git.kernel.org/stable/c/e40c52ee67b155ad59f59e73ea136d02685f0e0d>
- patch: <https://git.kernel.org/stable/c/b8b2f37cf632434456182e9002d63cbc4cccc50c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47034>

HTML: <https://flawdb.com/CVE-2021-47034> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47034>
