# CVE-2025-38320: arm64/ptrace: Fix stack-out-of-bounds read in regs\_get\_kernel\_stack\_nth()

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

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; 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.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2025-07-10T08:14:56.398Z
- **Modified:** 2026-11-05T21:18:26.613Z

## Who should check

- Anyone running Linux \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 64773b3ea09235168a549a195cba43bb867c4a17; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 67abac27d806e8f9d4226ec1528540cf73af673a; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 92750bfe7b0d8dbcaf578c091a65eda1c5f9ad38; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 01f91d415a8375d85e0c7d3615cd4a168308bb7c; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 21da6d3561f373898349ca7167c9811c020da695; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 22f935bc86bdfbde04009f05eee191d220cd8c89; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 422e565b7889ebfd9c8705a3fc786642afe61fca; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 39dfc971e42d886e7df01371cd1bef505076d84c
- Anyone running Linux 4.8

## Description

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

arm64/ptrace: Fix stack-out-of-bounds read in regs\_get\_kernel\_stack\_nth()

KASAN reports a stack-out-of-bounds read in regs\_get\_kernel\_stack\_nth().

Call Trace:
\[   97.283505\] BUG: KASAN: stack-out-of-bounds in regs\_get\_kernel\_stack\_nth+0xa8/0xc8
\[   97.284677\] Read of size 8 at addr ffff800089277c10 by task 1.sh/2550
\[   97.285732\]
\[   97.286067\] CPU: 7 PID: 2550 Comm: 1.sh Not tainted 6.6.0+ \#11
\[   97.287032\] Hardware name: linux,dummy-virt (DT)
\[   97.287815\] Call trace:
\[   97.288279\]  dump\_backtrace+0xa0/0x128
\[   97.288946\]  show\_stack+0x20/0x38
\[   97.289551\]  dump\_stack\_lvl+0x78/0xc8
\[   97.290203\]  print\_address\_description.constprop.0+0x84/0x3c8
\[   97.291159\]  print\_report+0xb0/0x280
\[   97.291792\]  kasan\_report+0x84/0xd0
\[   97.292421\]  \_\_asan\_load8+0x9c/0xc0
\[   97.293042\]  regs\_get\_kernel\_stack\_nth+0xa8/0xc8
\[   97.293835\]  process\_fetch\_insn+0x770/0xa30
\[   97.294562\]  kprobe\_trace\_func+0x254/0x3b0
\[   97.295271\]  kprobe\_dispatcher+0x98/0xe0
\[   97.295955\]  kprobe\_breakpoint\_handler+0x1b0/0x210
\[   97.296774\]  call\_break\_hook+0xc4/0x100
\[   97.297451\]  brk\_handler+0x24/0x78
\[   97.298073\]  do\_debug\_exception+0xac/0x178
\[   97.298785\]  el1\_dbg+0x70/0x90
\[   97.299344\]  el1h\_64\_sync\_handler+0xcc/0xe8
\[   97.300066\]  el1h\_64\_sync+0x78/0x80
\[   97.300699\]  kernel\_clone+0x0/0x500
\[   97.301331\]  \_\_arm64\_sys\_clone+0x70/0x90
\[   97.302084\]  invoke\_syscall+0x68/0x198
\[   97.302746\]  el0\_svc\_common.constprop.0+0x11c/0x150
\[   97.303569\]  do\_el0\_svc+0x38/0x50
\[   97.304164\]  el0\_svc+0x44/0x1d8
\[   97.304749\]  el0t\_64\_sync\_handler+0x100/0x130
\[   97.305500\]  el0t\_64\_sync+0x188/0x190
\[   97.306151\]
\[   97.306475\] The buggy address belongs to stack of task 1.sh/2550
\[   97.307461\]  and is located at offset 0 in frame:
\[   97.308257\]  \_\_se\_sys\_clone+0x0/0x138
\[   97.308910\]
\[   97.309241\] This frame has 1 object:
\[   97.309873\]  \[48, 184) 'args'
\[   97.309876\]
\[   97.310749\] The buggy address belongs to the virtual mapping at
\[   97.310749\]  \[ffff800089270000, ffff800089279000) created by:
\[   97.310749\]  dup\_task\_struct+0xc0/0x2e8
\[   97.313347\]
\[   97.313674\] The buggy address belongs to the physical page:
\[   97.314604\] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14f69a
\[   97.315885\] flags: 0x15ffffe00000000(node=1\|zone=2\|lastcpupid=0xfffff)
\[   97.316957\] raw: 015ffffe00000000 0000000000000000 dead000000000122 0000000000000000
\[   97.318207\] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
\[   97.319445\] page dumped because: kasan: bad access detected
\[   97.320371\]
\[   97.320694\] Memory state around the buggy address:
\[   97.321511\]  ffff800089277b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
\[   97.322681\]  ffff800089277b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
\[   97.323846\] \>ffff800089277c00: 00 00 f1 f1 f1 f1 f1 f1 00 00 00 00 00 00 00 00
\[   97.325023\]                          ^
\[   97.325683\]  ffff800089277c80: 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 f3
\[   97.326856\]  ffff800089277d00: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00

This issue seems to be related to the behavior of some gcc compilers and
was also fixed on the s390 architecture before:

 commit d93a855c31b7 ("s390/ptrace: Avoid KASAN false positives in regs\_get\_kernel\_stack\_nth()")

As described in that commit, regs\_get\_kernel\_stack\_nth() has confirmed that
\`addr\` is on the stack, so reading the value at \`\*addr\` should be allowed.
Use READ\_ONCE\_NOCHECK() helper to silence the KASAN check for this case.

\[will: Use '\*addr' as the argument to READ\_ONCE\_NOCHECK()\]

## Affected and fixed versions

- Linux: \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 64773b3ea09235168a549a195cba43bb867c4a17; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 67abac27d806e8f9d4226ec1528540cf73af673a; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 92750bfe7b0d8dbcaf578c091a65eda1c5f9ad38; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 01f91d415a8375d85e0c7d3615cd4a168308bb7c; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 21da6d3561f373898349ca7167c9811c020da695; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 22f935bc86bdfbde04009f05eee191d220cd8c89; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 422e565b7889ebfd9c8705a3fc786642afe61fca; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 39dfc971e42d886e7df01371cd1bef505076d84c (cvelist)
- Linux: 4.8 (cvelist)

## Mitigation

- Upgrade Linux to 39dfc971e42d886e7df01371cd1bef505076d84c or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38320.md
Affected: Linux >= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, < 64773b3ea09235168a549a195cba43bb867c4a17; >= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, < 67abac27d806e8f9d4226ec1528540cf73af673a; >= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, < 92750bfe7b0d8dbcaf578c091a65eda1c5f9ad38; >= 0a8ea52c3eb157dd65e224f…
Fixed in: Linux 64773b3ea09235168a549a195cba43bb867c4a17, Linux 67abac27d806e8f9d4226ec1528540cf73af673a, Linux 92750bfe7b0d8dbcaf578c091a65eda1c5f9ad38, Linux 01f91d415a8375d85e0c7d3615cd4a168308bb7c, Linux 21da6d3561f373898349ca7167c9811c020da695, Linux 22f935bc86bdfbde04009f05eee191d220cd8c89, Linux 422e5…

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-2025-38320 being exploited?

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

### How serious is CVE-2025-38320?

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

### Which versions are affected by CVE-2025-38320?

Linux \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 64773b3ea09235168a549a195cba43bb867c4a17; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 67abac27d806e8f9d4226ec1528540cf73af673a; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 92750bfe7b0d8dbcaf578c091a65eda1c5f9ad38; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 01f91d415a8375d85e0c7d3615cd4a168308bb7c; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 21da6d3561f373898349ca7167c9811c020da695; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 22f935bc86bdfbde04009f05eee191d220cd8c89; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 422e565b7889ebfd9c8705a3fc786642afe61fca; \>= 0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7, \< 39dfc971e42d886e7df01371cd1bef505076d84c; Linux 4.8.

### Is there a fix for CVE-2025-38320?

Yes. Fixed in Linux 64773b3ea09235168a549a195cba43bb867c4a17, Linux 67abac27d806e8f9d4226ec1528540cf73af673a, Linux 92750bfe7b0d8dbcaf578c091a65eda1c5f9ad38, Linux 01f91d415a8375d85e0c7d3615cd4a168308bb7c, Linux 21da6d3561f373898349ca7167c9811c020da695, Linux 22f935bc86bdfbde04009f05eee191d220cd8c89, Linux 422e565b7889ebfd9c8705a3fc786642afe61fca, Linux 39dfc971e42d886e7df01371cd1bef505076d84c. Upgrade Linux to 39dfc971e42d886e7df01371cd1bef505076d84c or later.

### How do I check if I'm affected by CVE-2025-38320?

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/64773b3ea09235168a549a195cba43bb867c4a17>
- patch: <https://git.kernel.org/stable/c/67abac27d806e8f9d4226ec1528540cf73af673a>
- patch: <https://git.kernel.org/stable/c/92750bfe7b0d8dbcaf578c091a65eda1c5f9ad38>
- patch: <https://git.kernel.org/stable/c/01f91d415a8375d85e0c7d3615cd4a168308bb7c>
- patch: <https://git.kernel.org/stable/c/21da6d3561f373898349ca7167c9811c020da695>
- patch: <https://git.kernel.org/stable/c/22f935bc86bdfbde04009f05eee191d220cd8c89>
- patch: <https://git.kernel.org/stable/c/422e565b7889ebfd9c8705a3fc786642afe61fca>
- patch: <https://git.kernel.org/stable/c/39dfc971e42d886e7df01371cd1bef505076d84c>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## 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-2025-38320>

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