syzbot


WARNING in bpf_lwt_seg6_adjust_srh

Status: upstream: reported C repro on 2024/06/25 16:51
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+608a2acde8c5a101d07d@syzkaller.appspotmail.com
Fix commit: c13fda93aca1 bpf: Remove tst_run from lwt_seg6local_prog_ops.
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-net-next-test-gce ci2-upstream-usb], missing on: [ci-qemu-native-arm64-kvm ci-qemu2-riscv64 ci-upstream-gce-arm64]
First crash: 27d, last: 12d
Cause bisection: introduced by (bisect log) :
commit d1542d4ae4dfdc47c9b3205ebe849ed23af213dd
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu Jun 20 13:22:02 2024 +0000

  seg6: Use nested-BH locking for seg6_bpf_srh_states.

Crash: WARNING in bpf_lwt_seg6_adjust_srh (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH bpf-next] bpf: Remove tst_run from lwt_seg6local_prog_ops. 4 (4) 2024/07/10 17:13
[PATCH bpf-next] seg6: Ensure that seg6_bpf_srh_states can only be accessed from input_action_end_bpf() 4 (4) 2024/07/09 18:24
[syzbot] [bpf?] [net?] WARNING in bpf_lwt_seg6_adjust_srh 1 (2) 2024/06/25 17:06

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5091 at net/core/filter.c:6579 ____bpf_lwt_seg6_adjust_srh net/core/filter.c:6579 [inline]
WARNING: CPU: 0 PID: 5091 at net/core/filter.c:6579 bpf_lwt_seg6_adjust_srh+0x877/0xb30 net/core/filter.c:6568
Modules linked in:
CPU: 0 PID: 5091 Comm: syz-executor570 Not tainted 6.10.0-rc4-syzkaller-00891-gbf2468f9afba #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:____bpf_lwt_seg6_adjust_srh net/core/filter.c:6579 [inline]
RIP: 0010:bpf_lwt_seg6_adjust_srh+0x877/0xb30 net/core/filter.c:6568
Code: bf 80 33 f8 eb 05 e8 b8 80 33 f8 48 c7 c0 f2 ff ff ff e9 d1 fc ff ff e8 a7 80 33 f8 48 63 c3 e9 c4 fc ff ff e8 9a 80 33 f8 90 <0f> 0b 90 4d 85 f6 0f 85 0e f9 ff ff e9 46 fa ff ff e8 83 80 33 f8
RSP: 0018:ffffc900034a77a0 EFLAGS: 00010293
RAX: ffffffff8962a486 RBX: 0000000000000000 RCX: ffff888017fdda00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900034a78d8 R08: ffffffff89629d8b R09: 1ffffffff1f5b52d
R10: dffffc0000000000 R11: ffffffffa00007d0 R12: 0000000000000000
R13: ffff8880b943d060 R14: 0000000000000000 R15: dffffc0000000000
FS:  000055555b006380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564def260000 CR3: 00000000775ec000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bpf_prog_2088341bddeddc1d+0x40/0x42
 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
 __bpf_prog_run include/linux/filter.h:691 [inline]
 bpf_prog_run include/linux/filter.h:698 [inline]
 bpf_test_run+0x4f0/0xa90 net/bpf/test_run.c:432
 bpf_prog_test_run_skb+0xafa/0x13b0 net/bpf/test_run.c:1081
 bpf_prog_test_run+0x33a/0x3b0 kernel/bpf/syscall.c:4313
 __sys_bpf+0x48d/0x810 kernel/bpf/syscall.c:5728
 __do_sys_bpf kernel/bpf/syscall.c:5817 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5815 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5815
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f541c355529
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffca122c488 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffca122c658 RCX: 00007f541c355529
RDX: 0000000000000050 RSI: 00000000200002c0 RDI: 000000000000000a
RBP: 00007f541c3c8610 R08: 0000000000000000 R09: 00007ffca122c658
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffca122c648 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (30):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/25 03:23 net-next bf2468f9afba 215eef4a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 19:55 bpf-next 7b769adc2612 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 19:53 bpf-next 7b769adc2612 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 19:53 bpf-next 7b769adc2612 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 19:51 bpf-next 7b769adc2612 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 19:46 bpf-next 7b769adc2612 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 19:45 bpf-next 7b769adc2612 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 19:21 bpf-next 7b769adc2612 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 19:21 bpf-next 7b769adc2612 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/28 11:33 net-next 8fda53719a59 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/28 11:33 net-next 8fda53719a59 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/25 02:34 net-next bf2468f9afba 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/25 02:33 net-next bf2468f9afba 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/25 02:31 net-next bf2468f9afba 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/25 02:30 net-next bf2468f9afba 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/25 02:08 net-next bf2468f9afba 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/25 02:08 net-next bf2468f9afba 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/25 01:55 net-next bf2468f9afba 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/06/25 01:55 net-next bf2468f9afba 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 06:44 linux-next 0b58e108042b bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/07/09 06:44 linux-next 0b58e108042b bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/07/04 04:54 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/07/04 04:53 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/06/28 00:04 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/06/27 23:51 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/06/27 23:32 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/06/27 22:50 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/06/27 22:49 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/06/27 20:23 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
2024/06/27 20:23 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in bpf_lwt_seg6_adjust_srh
* Struck through repros no longer work on HEAD.