HIGH Introduced in 4.18
bpf Seg6Local UAF
CVE-2026-98383
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.7HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Disallow bpf_skb_pull_data() for LWT_SEG6LOCAL An LWT_SEG6LOCAL program can invalidate its cached SRH with bpf_lwt_seg6_adjust_srh() and then call bpf_skb_pull_data(). The latter may reallocate skb->head, leaving the per-CPU SRH pointer dangling. Post-program SRH validation then writes through that pointer. Disallow bpf_skb_pull_data() for LWT_SEG6LOCAL programs so the verifier rejects this unsafe helper combination. Other LWT program types continue to expose the helper through lwt_out_func_proto().
02KernelScan AI Analysis
Risk summary
A privileged local user with init-namespace BPF and network administration capabilities can load a malicious LWT_SEG6LOCAL BPF program that triggers a use-after-free in the IPv6 Segment Routing Header validation path. The dangling pointer write can corrupt kernel memory, leading to potential code execution, information disclosure, or kernel crash. Exploitation requires IPv6 segment routing to be enabled and the attacker to attach the program to a seg6local route.
Vulnerability analysis
A BPF program attached to an IPv6 seg6local route can use a helper to modify the Segment Routing Header, which causes the kernel to cache a pointer to that header in a per-CPU buffer. If the program then calls a second helper that pulls and potentially reallocates the packet's data buffer, the cached header pointer becomes dangling. When the program returns, the kernel's post-program validation writes through that stale pointer, corrupting freed memory. The fix makes the BPF verifier reject the data-pulling helper for seg6local programs entirely, so the unsafe helper combination can never be loaded. Triggering this requires a local user with privileges to load BPF programs and attach them to network routes, and the IPv6 segment routing feature must be active.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 4.18 | 5.10.271 | 0f38472a2aa8 |
| 5.15 | 4.18 | 5.15.222 | cae8674489f2 |
| 6.1 | 4.18 | 6.1.189 | 9f9e57b5a3a0 |
| 6.12 | 4.18 | 6.12.112 | b9bb0e735460 |
| 6.18 | 4.18 | 6.18.55 | 37b18688cd18 |
| 6.6 | 4.18 | 6.6.158 | df0072be6fc3 |
| 7.2 | 4.18 | 7.2.9 | fca71ead7a20 |
| mainline | 4.18 | 7.3 | e4a62833adff |
| cip/4.19 | 4.18 | 4.19.325-cip137 | 04d289f091b7 |
| cip/5.10 | 4.18 | 5.10.271-cip78 | 0f38472a2aa8 |
| cip/5.10-rt | 4.18 | 5.10.272-cip79-rt35 | 0f38472a2aa8 |
| cip/6.1 | 4.18 | 6.1.189-cip61 | 9f9e57b5a3a0 |
| cip/6.1-rt | 4.18 | 6.1.189-cip61-rt32 | 9f9e57b5a3a0 |
| cip/6.12 | 4.18 | 6.12.112-cip33 | b9bb0e735460 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.112-cip33 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Fixed in 5.10.272-cip79-rt35 |
| cip/4.19 | Fixed in 4.19.325-cip137 |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |