# CVE-2023-52995: riscv/kprobe: Fix instruction simulation of JALR

> 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-03-27T16:43:29.853Z
- **Modified:** 2026-06-17T06:44:04.847Z

## Who should check

- Anyone running Linux \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< 614471b7f7cd28a2c96ab9c90b37471c82258ffb; \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< f4c8fc775fcbc9e9047b22671c55ca18f9a127d4; \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< ca0254998be4d74cf6add70ccfab0d2dbd362a10
- Anyone running Linux 5.12

## Description

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

riscv/kprobe: Fix instruction simulation of JALR

Set kprobe at 'jalr 1140(ra)' of vfs\_write results in the following
crash:

\[   32.092235\] Unable to handle kernel access to user memory without uaccess routines at virtual address 00aaaaaad77b1170
\[   32.093115\] Oops \[\#1\]
\[   32.093251\] Modules linked in:
\[   32.093626\] CPU: 0 PID: 135 Comm: ftracetest Not tainted 6.2.0-rc2-00013-gb0aa5e5df0cb-dirty \#16
\[   32.093985\] Hardware name: riscv-virtio,qemu (DT)
\[   32.094280\] epc : ksys\_read+0x88/0xd6
\[   32.094855\]  ra : ksys\_read+0xc0/0xd6
\[   32.095016\] epc : ffffffff801cda80 ra : ffffffff801cdab8 sp : ff20000000d7bdc0
\[   32.095227\]  gp : ffffffff80f14000 tp : ff60000080f9cb40 t0 : ffffffff80f13e80
\[   32.095500\]  t1 : ffffffff8000c29c t2 : ffffffff800dbc54 s0 : ff20000000d7be60
\[   32.095716\]  s1 : 0000000000000000 a0 : ffffffff805a64ae a1 : ffffffff80a83708
\[   32.095921\]  a2 : ffffffff80f160a0 a3 : 0000000000000000 a4 : f229b0afdb165300
\[   32.096171\]  a5 : f229b0afdb165300 a6 : ffffffff80eeebd0 a7 : 00000000000003ff
\[   32.096411\]  s2 : ff6000007ff76800 s3 : fffffffffffffff7 s4 : 00aaaaaad77b1170
\[   32.096638\]  s5 : ffffffff80f160a0 s6 : ff6000007ff76800 s7 : 0000000000000030
\[   32.096865\]  s8 : 00ffffffc3d97be0 s9 : 0000000000000007 s10: 00aaaaaad77c9410
\[   32.097092\]  s11: 0000000000000000 t3 : ffffffff80f13e48 t4 : ffffffff8000c29c
\[   32.097317\]  t5 : ffffffff8000c29c t6 : ffffffff800dbc54
\[   32.097505\] status: 0000000200000120 badaddr: 00aaaaaad77b1170 cause: 000000000000000d
\[   32.098011\] \[\<ffffffff801cdb72\>\] ksys\_write+0x6c/0xd6
\[   32.098222\] \[\<ffffffff801cdc06\>\] sys\_write+0x2a/0x38
\[   32.098405\] \[\<ffffffff80003c76\>\] ret\_from\_syscall+0x0/0x2

Since the rs1 and rd might be the same one, such as 'jalr 1140(ra)',
hence it requires obtaining the target address from rs1 followed by
updating rd.

\[Palmer: Pick Guo's cleanup\]

## Affected and fixed versions

- Linux: \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< 614471b7f7cd28a2c96ab9c90b37471c82258ffb; \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< f4c8fc775fcbc9e9047b22671c55ca18f9a127d4; \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< ca0254998be4d74cf6add70ccfab0d2dbd362a10 (cvelist)
- Linux: 5.12 (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-2023-52995. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52995.md
Affected: Linux >= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, < 614471b7f7cd28a2c96ab9c90b37471c82258ffb; >= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, < f4c8fc775fcbc9e9047b22671c55ca18f9a127d4; >= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, < ca0254998be4d74cf6add70ccfab0d2dbd362a10; Linux 5.12
Fixed in: Linux 614471b7f7cd28a2c96ab9c90b37471c82258ffb

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-2023-52995 being exploited?

There is no confirmed exploitation: CVE-2023-52995 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-2023-52995?

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

### Which versions are affected by CVE-2023-52995?

Linux \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< 614471b7f7cd28a2c96ab9c90b37471c82258ffb; \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< f4c8fc775fcbc9e9047b22671c55ca18f9a127d4; \>= c22b0bcb1dd024cb9caad9230e3a387d8b061df5, \< ca0254998be4d74cf6add70ccfab0d2dbd362a10; Linux 5.12.

### Is there a fix for CVE-2023-52995?

Yes. Fixed in Linux 614471b7f7cd28a2c96ab9c90b37471c82258ffb. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-52995?

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/614471b7f7cd28a2c96ab9c90b37471c82258ffb>
- patch: <https://git.kernel.org/stable/c/f4c8fc775fcbc9e9047b22671c55ca18f9a127d4>
- patch: <https://git.kernel.org/stable/c/ca0254998be4d74cf6add70ccfab0d2dbd362a10>

## 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-2023-52995>

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