stack segment fault in bpf_redirect

Status: closed as invalid on 2026/08/26 17:27
Subsystems: bpf net
Labels: prio:high
[Documentation on labels]
First crash: 194d, last: 54d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: failed (error log, bisect log)
  
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
8b6fb4df assessment-security DenialOfService: ✅ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ✅ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ stack segment fault in bpf_redirect 2026/05/19 20:45 2026/05/19 20:45 2026/05/19 21:37 1d9407ad
Last patch testing requests (11)
Created Duration User Patch Repo Result
2026/08/15 15:43 44m retest repro net no crash job log log
2026/08/03 05:04 32m retest repro net-next no crash log
2026/07/20 03:53 36m retest repro net-next log
2026/07/20 03:53 26m retest repro net-next log
2026/07/20 03:53 35m retest repro net-next log
2026/07/20 03:53 41m retest repro net-next log
2026/06/23 03:45 31m retest repro net-next log
2026/06/03 09:38 39m edumazet@google.com net log
2026/05/24 15:20 29m retest repro net-next log
2026/05/10 12:57 33m retest repro net-next report log
2026/05/10 12:57 33m retest repro net-next report log

Sample crash report:
syzkaller0: entered promiscuous mode
syzkaller0: entered allmulticast mode
Oops: stack segment: 0000 [#1] SMP KASAN PTI
CPU: 1 UID: 0 PID: 5988 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
RIP: 0010:bpf_net_ctx_get_ri include/linux/filter.h:820 [inline]
RIP: 0010:____bpf_redirect net/core/filter.c:2545 [inline]
RIP: 0010:bpf_redirect+0x58/0x170 net/core/filter.c:2543
Code: 81 c7 30 18 00 00 4c 89 f8 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 ff e8 b6 d8 b3 f8 4d 8b 3f 4d 8d 67 38 4c 89 e5 48 c1 ed 03 <42> 0f b6 44 2d 00 84 c0 0f 85 b9 00 00 00 41 8b 1c 24 89 de 83 e6
RSP: 0018:ffffc90003017078 EFLAGS: 00010202
RAX: 1ffff11005f93306 RBX: dffffc0000000000 RCX: ffff88802fc98000
RDX: 0000000000000000 RSI: 00000080ffffffff RDI: ffff88802a299b40
RBP: 0000000000000007 R08: 1ffff11005453382 R09: 1ffff11005453376
R10: ffffc90003017320 R11: ffffffffa0205108 R12: 0000000000000038
R13: dffffc0000000000 R14: 00000080ffffffff R15: 0000000000000000
FS:  000055555d9ee500(0000) GS:ffff8881255b0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000002280 CR3: 000000007e456000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 bpf_prog_6338e008a91e2d10+0x23/0x29
 bpf_dispatcher_nop_func include/linux/bpf.h:1402 [inline]
 __bpf_prog_run include/linux/filter.h:723 [inline]
 bpf_prog_run include/linux/filter.h:730 [inline]
 bpf_prog_run_data_pointers+0x19d/0x340 include/linux/filter.h:918
 cls_bpf_classify+0x25b/0xad0 net/sched/cls_bpf.c:103
 tc_classify include/net/tc_wrapper.h:197 [inline]
 __tcf_classify net/sched/cls_api.c:1764 [inline]
 tcf_classify+0x4cf/0x1130 net/sched/cls_api.c:1860
 drr_classify net/sched/sch_drr.c:317 [inline]
 drr_enqueue+0x2d4/0x9d0 net/sched/sch_drr.c:346
 dev_qdisc_enqueue+0x4e/0x240 net/core/dev.c:4144
 __dev_xmit_skb net/core/dev.c:4259 [inline]
 __dev_queue_xmit+0x1ae1/0x3850 net/core/dev.c:4795
 packet_snd net/packet/af_packet.c:3077 [inline]
 packet_sendmsg+0x3eb6/0x50f0 net/packet/af_packet.c:3109
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg net/socket.c:742 [inline]
 ____sys_sendmsg+0xa68/0xad0 net/socket.c:2592
 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2646
 __sys_sendmsg net/socket.c:2678 [inline]
 __do_sys_sendmsg net/socket.c:2683 [inline]
 __se_sys_sendmsg net/socket.c:2681 [inline]
 __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2681
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7efe1359bf79
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdb2b92be8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007efe13815fa0 RCX: 00007efe1359bf79
RDX: 0000000000000005 RSI: 0000200000000280 RDI: 0000000000000007
RBP: 00007efe136327e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007efe13815fac R14: 00007efe13815fa0 R15: 00007efe13815fa0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bpf_net_ctx_get_ri include/linux/filter.h:820 [inline]
RIP: 0010:____bpf_redirect net/core/filter.c:2545 [inline]
RIP: 0010:bpf_redirect+0x58/0x170 net/core/filter.c:2543
Code: 81 c7 30 18 00 00 4c 89 f8 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 ff e8 b6 d8 b3 f8 4d 8b 3f 4d 8d 67 38 4c 89 e5 48 c1 ed 03 <42> 0f b6 44 2d 00 84 c0 0f 85 b9 00 00 00 41 8b 1c 24 89 de 83 e6
RSP: 0018:ffffc90003017078 EFLAGS: 00010202
RAX: 1ffff11005f93306 RBX: dffffc0000000000 RCX: ffff88802fc98000
RDX: 0000000000000000 RSI: 00000080ffffffff RDI: ffff88802a299b40
RBP: 0000000000000007 R08: 1ffff11005453382 R09: 1ffff11005453376
R10: ffffc90003017320 R11: ffffffffa0205108 R12: 0000000000000038
R13: dffffc0000000000 R14: 00000080ffffffff R15: 0000000000000000
FS:  000055555d9ee500(0000) GS:ffff8881255b0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000002280 CR3: 000000007e456000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
   0:	81 c7 30 18 00 00    	add    $0x1830,%edi
   6:	4c 89 f8             	mov    %r15,%rax
   9:	48 c1 e8 03          	shr    $0x3,%rax
   d:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
  12:	74 08                	je     0x1c
  14:	4c 89 ff             	mov    %r15,%rdi
  17:	e8 b6 d8 b3 f8       	call   0xf8b3d8d2
  1c:	4d 8b 3f             	mov    (%r15),%r15
  1f:	4d 8d 67 38          	lea    0x38(%r15),%r12
  23:	4c 89 e5             	mov    %r12,%rbp
  26:	48 c1 ed 03          	shr    $0x3,%rbp
* 2a:	42 0f b6 44 2d 00    	movzbl 0x0(%rbp,%r13,1),%eax <-- trapping instruction
  30:	84 c0                	test   %al,%al
  32:	0f 85 b9 00 00 00    	jne    0xf1
  38:	41 8b 1c 24          	mov    (%r12),%ebx
  3c:	89 de                	mov    %ebx,%esi
  3e:	83                   	.byte 0x83
  3f:	e6                   	.byte 0xe6

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/14 18:52 net-next 37a93dd5c49b 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce stack segment fault in bpf_redirect
2026/02/14 17:13 net-next 37a93dd5c49b 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce stack segment fault in bpf_redirect
2026/02/14 15:29 net-next 37a93dd5c49b 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce stack segment fault in bpf_redirect
2026/02/14 13:43 net-next 37a93dd5c49b 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce stack segment fault in bpf_redirect
2026/02/14 12:00 net-next 37a93dd5c49b 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce stack segment fault in bpf_redirect
2026/04/26 11:50 net e728258debd5 9c2d0995 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce stack segment fault in bpf_redirect
2026/07/04 02:16 net-next 6fb33632323a fcece630 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce stack segment fault in bpf_redirect
2026/02/14 10:13 net-next 37a93dd5c49b 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce stack segment fault in bpf_redirect
2026/02/14 08:31 net-next 37a93dd5c49b 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce stack segment fault in bpf_redirect
* Struck through repros no longer work on HEAD.