syzbot


WARNING in sock_map_unref

Status: upstream: reported C repro on 2024/04/12 01:23
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+4b9597d9c853a4230301@syzkaller.appspotmail.com
Fix commit: ff9105993240 bpf, sockmap: Prevent lock inversion deadlock in map delete elem
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-arm64 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-qemu2-riscv64]
First crash: 43d, last: 26d
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bpf?] [net?] WARNING in sock_map_unref 1 (2) 2024/04/20 16:01
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 WARNING in sock_map_unref C done 18 41d 43d 3/3 fixed on 2024/05/13 23:49
linux-6.1 WARNING in sock_map_unref C done 18 41d 44d 3/3 fixed on 2024/05/15 09:17

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5065 at kernel/softirq.c:362 __local_bh_enable_ip+0xc3/0x120 kernel/softirq.c:362
Modules linked in:
CPU: 1 PID: 5065 Comm: syz-executor149 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:__local_bh_enable_ip+0xc3/0x120 kernel/softirq.c:362
Code: 00 e8 81 6c 0b 00 e8 4c 69 42 00 fb 65 8b 05 cc 34 b2 7e 85 c0 74 52 5b 5d c3 cc cc cc cc 65 8b 05 4e e9 b0 7e 85 c0 75 9e 90 <0f> 0b 90 eb 98 e8 73 67 42 00 eb 99 48 89 ef e8 f9 df 19 00 eb a2
RSP: 0018:ffffc900033df350 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000201 RCX: 1ffffffff1f3d467
RDX: 0000000000000000 RSI: 0000000000000201 RDI: ffffffff88cb2222
RBP: ffffffff88cb2222 R08: 0000000000000000 R09: ffffed100fc7b64f
R10: ffff88807e3db27b R11: ffffffff81e6fb83 R12: ffff88807e3db268
R13: ffff88807e3db268 R14: ffff88807e3db268 R15: 0000000000000000
FS:  00005555732bd380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000295b2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 spin_unlock_bh include/linux/spinlock.h:396 [inline]
 sock_map_del_link net/core/sock_map.c:161 [inline]
 sock_map_unref+0x3b2/0x6e0 net/core/sock_map.c:180
 __sock_map_delete net/core/sock_map.c:420 [inline]
 sock_map_delete_elem+0xf0/0x150 net/core/sock_map.c:446
 ___bpf_prog_run+0x3e51/0xae80 kernel/bpf/core.c:1997
 __bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2236
 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
 __bpf_prog_run include/linux/filter.h:657 [inline]
 bpf_prog_run include/linux/filter.h:664 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
 bpf_trace_run2+0x151/0x420 kernel/trace/bpf_trace.c:2420
 __bpf_trace_tlb_flush+0xd2/0x110 include/trace/events/tlb.h:38
 trace_tlb_flush+0xeb/0x150 include/trace/events/tlb.h:38
 switch_mm_irqs_off+0x68b/0xbc0 arch/x86/mm/tlb.c:645
 unuse_temporary_mm arch/x86/kernel/alternative.c:1832 [inline]
 __text_poke+0x543/0xcb0 arch/x86/kernel/alternative.c:1942
 text_poke_bp_batch+0x1cd/0x760 arch/x86/kernel/alternative.c:2293
 text_poke_flush arch/x86/kernel/alternative.c:2487 [inline]
 text_poke_flush arch/x86/kernel/alternative.c:2484 [inline]
 text_poke_finish+0x30/0x40 arch/x86/kernel/alternative.c:2494
 arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146
 jump_label_update+0x1d7/0x400 kernel/jump_label.c:829
 static_key_enable_cpuslocked+0x1b7/0x270 kernel/jump_label.c:205
 static_key_enable+0x1a/0x20 kernel/jump_label.c:218
 tracepoint_add_func+0xa4c/0xe50 kernel/tracepoint.c:361
 tracepoint_probe_register_prio_may_exist+0xbd/0x110 kernel/tracepoint.c:482
 tracepoint_probe_register_may_exist include/linux/tracepoint.h:52 [inline]
 __bpf_probe_register kernel/trace/bpf_trace.c:2446 [inline]
 bpf_probe_register+0x164/0x1d0 kernel/trace/bpf_trace.c:2452
 bpf_raw_tp_link_attach+0x2e5/0x610 kernel/bpf/syscall.c:3836
 bpf_raw_tracepoint_open kernel/bpf/syscall.c:3863 [inline]
 __sys_bpf+0x3a0/0x4b40 kernel/bpf/syscall.c:5673
 __do_sys_bpf kernel/bpf/syscall.c:5738 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5736 [inline]
 __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5736
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd2/0x260 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7ff61e228fb9
Code: Unable to access opcode bytes at 0x7ff61e228f8f.
RSP: 002b:00007fffcfb4b8a8 EFLAGS: 00000246
 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff61e228fb9
RDX: 0000000000000010 RSI: 0000000020000040 RDI: 0000000000000011
RBP: 0000000000000000 R08: 0000000000000140 R09: 0000000000000140
R10: 0000000000000140 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fffcfb4b8d7 R15: 000000000000000c
 </TASK>

Crashes (97):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/08 02:01 upstream fe46a7dd189e ca620dd8 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in sock_map_unref
2024/04/08 01:54 upstream fe46a7dd189e ca620dd8 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/25 09:35 bpf 443574b03387 8bdc0f22 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/15 13:57 bpf 443574b03387 c8349e48 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/10 11:28 net f99c5f563c17 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/10 08:53 bpf 443574b03387 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/10 07:53 bpf 443574b03387 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/10 07:11 net f99c5f563c17 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/10 07:11 bpf 443574b03387 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/10 06:32 bpf 443574b03387 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/10 05:52 bpf 443574b03387 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/10 05:13 bpf 443574b03387 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/10 02:36 net f99c5f563c17 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/10 01:59 net f99c5f563c17 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/10 00:46 net f99c5f563c17 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/10 00:09 net f99c5f563c17 56086b24 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/08 01:59 net f99c5f563c17 ca620dd8 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/08 01:50 bpf 443574b03387 ca620dd8 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/08 01:44 bpf-next 14bb1e8c8d4a ca620dd8 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in sock_map_unref
2024/04/14 20:36 upstream fe46a7dd189e c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in sock_map_unref
2024/04/12 15:32 upstream fe46a7dd189e 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in sock_map_unref
2024/04/12 10:55 upstream fe46a7dd189e 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/11 23:34 upstream fe46a7dd189e 478efa7f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in sock_map_unref
2024/04/11 17:40 upstream fe46a7dd189e 478efa7f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/11 16:19 upstream fe46a7dd189e 478efa7f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in sock_map_unref
2024/04/11 04:17 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in sock_map_unref
2024/04/11 01:28 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in sock_map_unref
2024/04/11 00:14 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/10 09:30 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in sock_map_unref
2024/04/10 02:03 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/10 02:02 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in sock_map_unref
2024/04/10 01:08 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in sock_map_unref
2024/04/09 19:44 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/09 18:25 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/09 18:19 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in sock_map_unref
2024/04/09 18:16 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in sock_map_unref
2024/04/09 17:40 upstream fe46a7dd189e 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/08 21:52 upstream fe46a7dd189e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in sock_map_unref
2024/04/08 19:13 upstream fe46a7dd189e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in sock_map_unref
2024/04/08 18:49 upstream fe46a7dd189e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/08 01:27 upstream fe46a7dd189e ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in sock_map_unref
2024/04/08 01:25 upstream fe46a7dd189e ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in sock_map_unref
2024/04/25 13:35 bpf 443574b03387 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/25 01:35 bpf 443574b03387 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/24 21:33 bpf 443574b03387 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/24 19:15 bpf 443574b03387 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/24 07:59 bpf 443574b03387 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/23 09:52 bpf 443574b03387 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/23 08:13 bpf 443574b03387 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/20 08:44 bpf 443574b03387 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/20 04:19 bpf 443574b03387 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/19 00:48 net f99c5f563c17 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/19 00:27 net f99c5f563c17 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/18 23:07 net f99c5f563c17 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/18 21:47 net f99c5f563c17 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/18 17:05 net f99c5f563c17 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/17 11:30 net f99c5f563c17 18f6e127 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/17 10:00 bpf 443574b03387 18f6e127 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/16 17:41 net f99c5f563c17 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/16 08:58 net f99c5f563c17 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/13 02:26 bpf 443574b03387 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/10 02:05 net f99c5f563c17 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/09 18:38 bpf 443574b03387 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/09 18:31 bpf 443574b03387 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/09 14:50 net f99c5f563c17 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/09 14:50 net f99c5f563c17 56086b24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/08 22:09 net f99c5f563c17 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/08 01:30 bpf 443574b03387 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/08 01:29 net f99c5f563c17 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in sock_map_unref
2024/04/08 01:19 bpf 443574b03387 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in sock_map_unref
2024/04/08 01:25 bpf-next 14bb1e8c8d4a ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in sock_map_unref
2024/04/08 01:14 bpf-next 14bb1e8c8d4a ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in sock_map_unref
* Struck through repros no longer work on HEAD.