Skip to main content
Network Thinking Solutions Logo

CVE-2021-47350

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.

All CVEs
CVE-2021-47350Published 5/21/2024

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.

Vendor advisory
CVSS5.5Medium

Overview

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.

Published
5/21/2024
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
linux kernel
linux
≥ 4.14, < 5.4.133

Verify advisory

Source
linux kernel
linux
≥ 5.5, < 5.10.51

Verify advisory

Source
linux kernel
linux
≥ 5.11, < 5.12.18

Verify advisory

Source
linux kernel
linux
≥ 5.13, < 5.13.3

Verify advisory

Source
Linux
Linux
≥ d3ca587404b36943b02df87406054ce73cc49500, < a82471a14aad90f79d1608d2bcbb019f0ffb53f0

Verify advisory

Source
Linux
Linux
≥ d3ca587404b36943b02df87406054ce73cc49500, < d2e52d4664097a6c1f591d869ec594bd7a0d4925

Verify advisory

Source
Linux
Linux
≥ d3ca587404b36943b02df87406054ce73cc49500, < 500f81cec9f1bfa5210aa9dd5ba9a06e22f62a35

Verify advisory

Source
Linux
Linux
≥ d3ca587404b36943b02df87406054ce73cc49500, < 8a96ec5ebf96ad8e2ba7b1b34103a0be5140fc70

Verify advisory

Source
Linux
Linux
≥ d3ca587404b36943b02df87406054ce73cc49500, < cd5d5e602f502895e47e18cd46804d6d7014e65c

Verify advisory

Source
Linux
Linux
4.14

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 5.5. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.