# CVE-2022-49164: powerpc/tm: Fix more userspace r13 corruption

> 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, NVD) `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.28% (percentile 13, 2026-11-26)
- **Published:** 2025-02-26T01:55:24.540Z
- **Modified:** 2026-06-17T05:17:15.357Z

## Who should check

- Anyone running Linux \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 5dce84f475d13b773a1a4c823581cab25044d86a; \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 73d8082c90f17dfba57cad4ca94db5cae323f1b1; \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 9d71165d3934e607070c4e48458c0cf161b1baea
- Anyone running Linux 3.9

## Description

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

powerpc/tm: Fix more userspace r13 corruption

Commit cf13435b730a ("powerpc/tm: Fix userspace r13 corruption") fixes a
problem in treclaim where a SLB miss can occur on the
thread\_struct-\>ckpt\_regs while SCRATCH0 is live with the saved user r13
value, clobbering it with the kernel r13 and ultimately resulting in
kernel r13 being stored in ckpt\_regs.

There is an equivalent problem in trechkpt where the user r13 value is
loaded into r13 from chkpt\_regs to be recheckpointed, but a SLB miss
could occur on ckpt\_regs accesses after that, which will result in r13
being clobbered with a kernel value and that will get recheckpointed and
then restored to user registers.

The same memory page is accessed right before this critical window where
a SLB miss could cause corruption, so hitting the bug requires the SLB
entry be removed within a small window of instructions, which is
possible if a SLB related MCE hits there. PAPR also permits the
hypervisor to discard this SLB entry (because slb\_shadow-\>persistent is
only set to SLB\_NUM\_BOLTED) although it's not known whether any
implementations would do this (KVM does not). So this is an extremely
unlikely bug, only found by inspection.

Fix this by also storing user r13 in a temporary location on the kernel
stack and don't change the r13 register from kernel r13 until the RI=0
critical section that does not fault.

The SCRATCH0 change is not strictly part of the fix, it's only used in
the RI=0 section so it does not have the same problem as the previous
SCRATCH0 bug.

## Affected and fixed versions

- Linux: \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 5dce84f475d13b773a1a4c823581cab25044d86a; \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 73d8082c90f17dfba57cad4ca94db5cae323f1b1; \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 9d71165d3934e607070c4e48458c0cf161b1baea (cvelist)
- Linux: 3.9 (cvelist)

## Mitigation

- Upgrade Linux to 9d71165d3934e607070c4e48458c0cf161b1baea or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49164.md
Affected: Linux >= 98ae22e15b430bfed5def01ac1a88ec9396284c8, < 5dce84f475d13b773a1a4c823581cab25044d86a; >= 98ae22e15b430bfed5def01ac1a88ec9396284c8, < 73d8082c90f17dfba57cad4ca94db5cae323f1b1; >= 98ae22e15b430bfed5def01ac1a88ec9396284c8, < 9d71165d3934e607070c4e48458c0cf161b1baea; Linux 3.9
Fixed in: Linux 5dce84f475d13b773a1a4c823581cab25044d86a, Linux 73d8082c90f17dfba57cad4ca94db5cae323f1b1, Linux 9d71165d3934e607070c4e48458c0cf161b1baea

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-2022-49164 being exploited?

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

### How serious is CVE-2022-49164?

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

### Which versions are affected by CVE-2022-49164?

Linux \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 5dce84f475d13b773a1a4c823581cab25044d86a; \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 73d8082c90f17dfba57cad4ca94db5cae323f1b1; \>= 98ae22e15b430bfed5def01ac1a88ec9396284c8, \< 9d71165d3934e607070c4e48458c0cf161b1baea; Linux 3.9.

### Is there a fix for CVE-2022-49164?

Yes. Fixed in Linux 5dce84f475d13b773a1a4c823581cab25044d86a, Linux 73d8082c90f17dfba57cad4ca94db5cae323f1b1, Linux 9d71165d3934e607070c4e48458c0cf161b1baea. Upgrade Linux to 9d71165d3934e607070c4e48458c0cf161b1baea or later.

### How do I check if I'm affected by CVE-2022-49164?

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/5dce84f475d13b773a1a4c823581cab25044d86a>
- patch: <https://git.kernel.org/stable/c/73d8082c90f17dfba57cad4ca94db5cae323f1b1>
- patch: <https://git.kernel.org/stable/c/9d71165d3934e607070c4e48458c0cf161b1baea>

## 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-2022-49164>

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