# CVE-2025-38476: rpl: Fix use-after-free in rpl\_do\_srh\_inline().

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

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.81% (percentile 54, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-07-28T11:21:37.175Z
- **Modified:** 2026-08-05T12:02:13.331Z

## Who should check

- Anyone running Linux \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< c09e21dfc08d8afb92d9ea3bee3457adbe3ef297; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 8ba6c2362b85089b8972ac5f20b24fc71a4b8ffc; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< e8101506ab86dd78f823b7028f2036a380f3a12a; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 62dcd9d6e61c39122d2f251a26829e2e55b0a11d; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 06ec83b6c792fde1f710c1de3e836da6e257c4c4; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 034b428aa3583373a5a20b1c5931bb2b3cae1f36; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< b640daa2822a39ff76e70200cb2b7b892b896dce
- Anyone running Linux 5.7

## Description

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

rpl: Fix use-after-free in rpl\_do\_srh\_inline().

Running lwt\_dst\_cache\_ref\_loop.sh in selftest with KASAN triggers
the splat below \[0\].

rpl\_do\_srh\_inline() fetches ipv6\_hdr(skb) and accesses it after
skb\_cow\_head(), which is illegal as the header could be freed then.

Let's fix it by making oldhdr to a local struct instead of a pointer.

\[0\]:
\[root@fedora net\]\# ./lwt\_dst\_cache\_ref\_loop.sh
...
TEST: rpl (input)
\[   57.631529\] ==================================================================
BUG: KASAN: slab-use-after-free in rpl\_do\_srh\_inline.isra.0 (net/ipv6/rpl\_iptunnel.c:174)
Read of size 40 at addr ffff888122bf96d8 by task ping6/1543

CPU: 50 UID: 0 PID: 1543 Comm: ping6 Not tainted 6.16.0-rc5-01302-gfadd1e6231b1 \#23 PREEMPT(voluntary)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 \<IRQ\>
 dump\_stack\_lvl (lib/dump\_stack.c:122)
 print\_report (mm/kasan/report.c:409 mm/kasan/report.c:521)
 kasan\_report (mm/kasan/report.c:221 mm/kasan/report.c:636)
 kasan\_check\_range (mm/kasan/generic.c:175 (discriminator 1) mm/kasan/generic.c:189 (discriminator 1))
 \_\_asan\_memmove (mm/kasan/shadow.c:94 (discriminator 2))
 rpl\_do\_srh\_inline.isra.0 (net/ipv6/rpl\_iptunnel.c:174)
 rpl\_input (net/ipv6/rpl\_iptunnel.c:201 net/ipv6/rpl\_iptunnel.c:282)
 lwtunnel\_input (net/core/lwtunnel.c:459)
 ipv6\_rcv (./include/net/dst.h:471 (discriminator 1) ./include/net/dst.h:469 (discriminator 1) net/ipv6/ip6\_input.c:79 (discriminator 1) ./include/linux/netfilter.h:317 (discriminator 1) ./include/linux/netfilter.h:311 (discriminator 1) net/ipv6/ip6\_input.c:311 (discriminator 1))
 \_\_netif\_receive\_skb\_one\_core (net/core/dev.c:5967)
 process\_backlog (./include/linux/rcupdate.h:869 net/core/dev.c:6440)
 \_\_napi\_poll.constprop.0 (net/core/dev.c:7452)
 net\_rx\_action (net/core/dev.c:7518 net/core/dev.c:7643)
 handle\_softirqs (kernel/softirq.c:579)
 do\_softirq (kernel/softirq.c:480 (discriminator 20))
 \</IRQ\>
 \<TASK\>
 \_\_local\_bh\_enable\_ip (kernel/softirq.c:407)
 \_\_dev\_queue\_xmit (net/core/dev.c:4740)
 ip6\_finish\_output2 (./include/linux/netdevice.h:3358 ./include/net/neighbour.h:526 ./include/net/neighbour.h:540 net/ipv6/ip6\_output.c:141)
 ip6\_finish\_output (net/ipv6/ip6\_output.c:215 net/ipv6/ip6\_output.c:226)
 ip6\_output (./include/linux/netfilter.h:306 net/ipv6/ip6\_output.c:248)
 ip6\_send\_skb (net/ipv6/ip6\_output.c:1983)
 rawv6\_sendmsg (net/ipv6/raw.c:588 net/ipv6/raw.c:918)
 \_\_sys\_sendto (net/socket.c:714 (discriminator 1) net/socket.c:729 (discriminator 1) net/socket.c:2228 (discriminator 1))
 \_\_x64\_sys\_sendto (net/socket.c:2231)
 do\_syscall\_64 (arch/x86/entry/syscall\_64.c:63 (discriminator 1) arch/x86/entry/syscall\_64.c:94 (discriminator 1))
 entry\_SYSCALL\_64\_after\_hwframe (arch/x86/entry/entry\_64.S:130)
RIP: 0033:0x7f68cffb2a06
Code: 5d e8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 75 19 83 e2 39 83 fa 08 75 11 e8 26 ff ff ff 66 0f 1f 44 00 00 48 8b 45 10 0f 05 \<48\> 8b 5d f8 c9 c3 0f 1f 40 00 f3 0f 1e fa 55 48 89 e5 48 83 ec 08
RSP: 002b:00007ffefb7c53d0 EFLAGS: 00000202 ORIG\_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000564cd69f10a0 RCX: 00007f68cffb2a06
RDX: 0000000000000040 RSI: 0000564cd69f10a4 RDI: 0000000000000003
RBP: 00007ffefb7c53f0 R08: 0000564cd6a032ac R09: 000000000000001c
R10: 0000000000000000 R11: 0000000000000202 R12: 0000564cd69f10a4
R13: 0000000000000040 R14: 00007ffefb7c66e0 R15: 0000564cd69f10a0
 \</TASK\>

Allocated by task 1543:
 kasan\_save\_stack (mm/kasan/common.c:48)
 kasan\_save\_track (mm/kasan/common.c:60 (discriminator 1) mm/kasan/common.c:69 (discriminator 1))
 \_\_kasan\_slab\_alloc (mm/kasan/common.c:319 mm/kasan/common.c:345)
 kmem\_cache\_alloc\_node\_noprof (./include/linux/kasan.h:250 mm/slub.c:4148 mm/slub.c:4197 mm/slub.c:4249)
 kmalloc\_reserve (net/core/skbuff.c:581 (discriminator 88))
 \_\_alloc\_skb (net/core/skbuff.c:669)
 \_\_ip6\_append\_data (net/ipv6/ip6\_output.c:1672 (discriminator 1))
 ip6\_
---truncated---

## Affected and fixed versions

- Linux: \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< c09e21dfc08d8afb92d9ea3bee3457adbe3ef297; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 8ba6c2362b85089b8972ac5f20b24fc71a4b8ffc; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< e8101506ab86dd78f823b7028f2036a380f3a12a; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 62dcd9d6e61c39122d2f251a26829e2e55b0a11d; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 06ec83b6c792fde1f710c1de3e836da6e257c4c4; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 034b428aa3583373a5a20b1c5931bb2b3cae1f36; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< b640daa2822a39ff76e70200cb2b7b892b896dce (cvelist)
- Linux: 5.7 (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-2025-38476. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38476.md
Affected: Linux >= a7a29f9c361f8542604ef959ae6627f423b7a412, < c09e21dfc08d8afb92d9ea3bee3457adbe3ef297; >= a7a29f9c361f8542604ef959ae6627f423b7a412, < 8ba6c2362b85089b8972ac5f20b24fc71a4b8ffc; >= a7a29f9c361f8542604ef959ae6627f423b7a412, < e8101506ab86dd78f823b7028f2036a380f3a12a; >= a7a29f9c361f8542604ef95…
Fixed in: Linux 8ba6c2362b85089b8972ac5f20b24fc71a4b8ffc, Linux 62dcd9d6e61c39122d2f251a26829e2e55b0a11d, Linux 06ec83b6c792fde1f710c1de3e836da6e257c4c4, Linux 034b428aa3583373a5a20b1c5931bb2b3cae1f36

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

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

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

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

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

Linux \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< c09e21dfc08d8afb92d9ea3bee3457adbe3ef297; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 8ba6c2362b85089b8972ac5f20b24fc71a4b8ffc; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< e8101506ab86dd78f823b7028f2036a380f3a12a; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 62dcd9d6e61c39122d2f251a26829e2e55b0a11d; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 06ec83b6c792fde1f710c1de3e836da6e257c4c4; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< 034b428aa3583373a5a20b1c5931bb2b3cae1f36; \>= a7a29f9c361f8542604ef959ae6627f423b7a412, \< b640daa2822a39ff76e70200cb2b7b892b896dce; Linux 5.7.

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

Yes. Fixed in Linux 8ba6c2362b85089b8972ac5f20b24fc71a4b8ffc, Linux 62dcd9d6e61c39122d2f251a26829e2e55b0a11d, Linux 06ec83b6c792fde1f710c1de3e836da6e257c4c4, Linux 034b428aa3583373a5a20b1c5931bb2b3cae1f36. No fix listed yet: follow the vendor advisory.

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

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/c09e21dfc08d8afb92d9ea3bee3457adbe3ef297>
- patch: <https://git.kernel.org/stable/c/8ba6c2362b85089b8972ac5f20b24fc71a4b8ffc>
- patch: <https://git.kernel.org/stable/c/e8101506ab86dd78f823b7028f2036a380f3a12a>
- patch: <https://git.kernel.org/stable/c/62dcd9d6e61c39122d2f251a26829e2e55b0a11d>
- patch: <https://git.kernel.org/stable/c/06ec83b6c792fde1f710c1de3e836da6e257c4c4>
- patch: <https://git.kernel.org/stable/c/034b428aa3583373a5a20b1c5931bb2b3cae1f36>
- patch: <https://git.kernel.org/stable/c/b640daa2822a39ff76e70200cb2b7b892b896dce>
- 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-38476>

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