# CVE-2021-47350: powerpc/mm: Fix lockup on kernel exec fault

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; 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.23% (percentile 8, 2026-11-28)
- **CWE:** CWE-667
- **Published:** 2024-05-21T14:35:55.154Z
- **Modified:** 2026-06-17T04:17:15.893Z

## Who should check

- Anyone running Linux \>= d3ca587404b36943b02df87406054ce73cc49500, \< a82471a14aad90f79d1608d2bcbb019f0ffb53f0; \>= d3ca587404b36943b02df87406054ce73cc49500, \< d2e52d4664097a6c1f591d869ec594bd7a0d4925; \>= d3ca587404b36943b02df87406054ce73cc49500, \< 500f81cec9f1bfa5210aa9dd5ba9a06e22f62a35; \>= d3ca587404b36943b02df87406054ce73cc49500, \< 8a96ec5ebf96ad8e2ba7b1b34103a0be5140fc70; \>= d3ca587404b36943b02df87406054ce73cc49500, \< cd5d5e602f502895e47e18cd46804d6d7014e65c
- Anyone running Linux 4.14

## Description

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

powerpc/mm: Fix lockup on kernel exec fault

The powerpc kernel is not prepared to handle exec faults from kernel.
Especially, the function is\_exec\_fault() will return 'false' when an
exec fault is taken by kernel, because the check is based on reading
current-\>thread.regs-\>trap which contains the trap from user.

For instance, when provoking a LKDTM EXEC\_USERSPACE test,
current-\>thread.regs-\>trap is set to SYSCALL trap (0xc00), and
the fault taken by the kernel is not seen as an exec fault by
set\_access\_flags\_filter().

Commit d7df2443cd5f ("powerpc/mm: Fix spurious segfaults on radix
with autonuma") made it clear and handled it properly. But later on
commit d3ca587404b3 ("powerpc/mm: Fix reporting of kernel execute
faults") removed that handling, introducing test based on error\_code.
And here is the problem, because on the 603 all upper bits of SRR1
get cleared when the TLB instruction miss handler bails out to ISI.

Until commit cbd7e6ca0210 ("powerpc/fault: Avoid heavy
search\_exception\_tables() verification"), an exec fault from kernel
at a userspace address was indirectly caught by the lack of entry for
that address in the exception tables. But after that commit the
kernel mainly relies on KUAP or on core mm handling to catch wrong
user accesses. Here the access is not wrong, so mm handles it.
It is a minor fault because PAGE\_EXEC is not set,
set\_access\_flags\_filter() should set PAGE\_EXEC and voila.
But as is\_exec\_fault() returns false as explained in the beginning,
set\_access\_flags\_filter() bails out without setting PAGE\_EXEC flag,
which leads to a forever minor exec fault.

As the kernel is not prepared to handle such exec faults, the thing to
do is to fire in bad\_kernel\_fault() for any exec fault taken by the
kernel, as it was prior to commit d3ca587404b3.

## Affected and fixed versions

- Linux: \>= d3ca587404b36943b02df87406054ce73cc49500, \< a82471a14aad90f79d1608d2bcbb019f0ffb53f0; \>= d3ca587404b36943b02df87406054ce73cc49500, \< d2e52d4664097a6c1f591d869ec594bd7a0d4925; \>= d3ca587404b36943b02df87406054ce73cc49500, \< 500f81cec9f1bfa5210aa9dd5ba9a06e22f62a35; \>= d3ca587404b36943b02df87406054ce73cc49500, \< 8a96ec5ebf96ad8e2ba7b1b34103a0be5140fc70; \>= d3ca587404b36943b02df87406054ce73cc49500, \< cd5d5e602f502895e47e18cd46804d6d7014e65c (cvelist)
- Linux: 4.14 (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-47350. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47350.md
Affected: Linux >= d3ca587404b36943b02df87406054ce73cc49500, < a82471a14aad90f79d1608d2bcbb019f0ffb53f0; >= d3ca587404b36943b02df87406054ce73cc49500, < d2e52d4664097a6c1f591d869ec594bd7a0d4925; >= d3ca587404b36943b02df87406054ce73cc49500, < 500f81cec9f1bfa5210aa9dd5ba9a06e22f62a35; >= d3ca587404b36943b02df87…
Fixed in: Linux 500f81cec9f1bfa5210aa9dd5ba9a06e22f62a35, Linux 8a96ec5ebf96ad8e2ba7b1b34103a0be5140fc70

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-47350 being exploited?

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

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

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

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

Linux \>= d3ca587404b36943b02df87406054ce73cc49500, \< a82471a14aad90f79d1608d2bcbb019f0ffb53f0; \>= d3ca587404b36943b02df87406054ce73cc49500, \< d2e52d4664097a6c1f591d869ec594bd7a0d4925; \>= d3ca587404b36943b02df87406054ce73cc49500, \< 500f81cec9f1bfa5210aa9dd5ba9a06e22f62a35; \>= d3ca587404b36943b02df87406054ce73cc49500, \< 8a96ec5ebf96ad8e2ba7b1b34103a0be5140fc70; \>= d3ca587404b36943b02df87406054ce73cc49500, \< cd5d5e602f502895e47e18cd46804d6d7014e65c; Linux 4.14.

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

Yes. Fixed in Linux 500f81cec9f1bfa5210aa9dd5ba9a06e22f62a35, Linux 8a96ec5ebf96ad8e2ba7b1b34103a0be5140fc70. No fix listed yet: follow the vendor advisory.

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

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/a82471a14aad90f79d1608d2bcbb019f0ffb53f0>
- patch: <https://git.kernel.org/stable/c/d2e52d4664097a6c1f591d869ec594bd7a0d4925>
- patch: <https://git.kernel.org/stable/c/500f81cec9f1bfa5210aa9dd5ba9a06e22f62a35>
- patch: <https://git.kernel.org/stable/c/8a96ec5ebf96ad8e2ba7b1b34103a0be5140fc70>
- patch: <https://git.kernel.org/stable/c/cd5d5e602f502895e47e18cd46804d6d7014e65c>

## 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-47350>

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