syzbot


WARNING in bpf_bprintf_prepare

Status: fixed on 2021/11/10 00:50
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+63122d0bc347f18c1884@syzkaller.appspotmail.com
Fix commit: e2d5b2bb769f bpf: Fix nested bpf_bprintf_prepare with more per-cpu buffers
First crash: 1263d, last: 1214d
Cause bisection: introduced by (bisect log) [merge commit]:
commit d6560052c2f73db59834e9a3c0aba20579aa7059
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Mon Feb 22 17:16:38 2021 +0000

  Merge tag 'regulator-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Crash: WARNING in kvm_wait (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH bpf v2] bpf: Fix nested bpf_bprintf_prepare with more per-cpu buffers 3 (3) 2021/05/11 21:12
[PATCH bpf] bpf: Fix nested bpf_bprintf_prepare with more per-cpu buffers 4 (4) 2021/05/11 08:09
[syzbot] WARNING in bpf_bprintf_prepare 0 (1) 2021/05/10 16:39
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in bpf_bprintf_prepare (2) bpf C 2 730d 769d 22/28 fixed on 2023/02/24 13:50

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 8388 at kernel/bpf/helpers.c:712 try_get_fmt_tmp_buf kernel/bpf/helpers.c:712 [inline]
WARNING: CPU: 1 PID: 8388 at kernel/bpf/helpers.c:712 bpf_bprintf_prepare+0xeba/0x10b0 kernel/bpf/helpers.c:760
Modules linked in:
CPU: 1 PID: 8388 Comm: syz-executor545 Not tainted 5.12.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:try_get_fmt_tmp_buf kernel/bpf/helpers.c:712 [inline]
RIP: 0010:bpf_bprintf_prepare+0xeba/0x10b0 kernel/bpf/helpers.c:760
Code: c6 e8 3a 4d 5e 02 83 c0 01 48 98 48 01 c5 48 89 6c 24 08 e8 78 0a ed ff 8d 6b 02 83 44 24 10 01 e9 d6 f5 ff ff e8 66 0a ed ff <0f> 0b 65 ff 0d fd 12 7c 7e bf 01 00 00 00 41 bc f0 ff ff ff e8 dd
RSP: 0018:ffffc90000dc0290 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000100
RDX: ffff888013b88000 RSI: ffffffff8186ebfa RDI: 0000000000000003
RBP: 0000000000000002 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff8186e794 R11: 0000000000000000 R12: ffffc90000dc03c0
R13: 0000000000000100 R14: ffffc90000dc0478 R15: 0000000000000003
FS:  00000000013d1300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004b00f0 CR3: 0000000014d6b000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 ____bpf_trace_printk kernel/trace/bpf_trace.c:389 [inline]
 bpf_trace_printk+0xab/0x3a0 kernel/trace/bpf_trace.c:380
 bpf_prog_0605f9f479290f07+0x2f/0xfd8
 bpf_dispatcher_nop_func include/linux/bpf.h:684 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:1788 [inline]
 bpf_trace_run2+0x12f/0x390 kernel/trace/bpf_trace.c:1825
 __bpf_trace_net_dev_start_xmit+0xb1/0xe0 include/trace/events/tcp.h:238
 trace_net_dev_start_xmit include/trace/events/net.h:14 [inline]
 xmit_one net/core/dev.c:3653 [inline]
 dev_hard_start_xmit+0x57b/0x920 net/core/dev.c:3670
 sch_direct_xmit+0x2e1/0xbd0 net/sched/sch_generic.c:313
 qdisc_restart net/sched/sch_generic.c:376 [inline]
 __qdisc_run+0x4ba/0x15f0 net/sched/sch_generic.c:384
 qdisc_run include/net/pkt_sched.h:136 [inline]
 qdisc_run include/net/pkt_sched.h:128 [inline]
 __dev_xmit_skb net/core/dev.c:3856 [inline]
 __dev_queue_xmit+0x142e/0x2e30 net/core/dev.c:4213
 neigh_hh_output include/net/neighbour.h:499 [inline]
 neigh_output include/net/neighbour.h:508 [inline]
 ip6_finish_output2+0x911/0x1700 net/ipv6/ip6_output.c:117
 __ip6_finish_output net/ipv6/ip6_output.c:182 [inline]
 __ip6_finish_output+0x4c1/0xe10 net/ipv6/ip6_output.c:161
 ip6_finish_output+0x35/0x200 net/ipv6/ip6_output.c:192
 NF_HOOK_COND include/linux/netfilter.h:290 [inline]
 ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:215
 dst_output include/net/dst.h:448 [inline]
 NF_HOOK include/linux/netfilter.h:301 [inline]
 ndisc_send_skb+0xa99/0x1750 net/ipv6/ndisc.c:508
 ndisc_send_rs+0x12e/0x6f0 net/ipv6/ndisc.c:702
 addrconf_rs_timer+0x3f2/0x820 net/ipv6/addrconf.c:3877
 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1431
 expire_timers kernel/time/timer.c:1476 [inline]
 __run_timers.part.0+0x67c/0xa50 kernel/time/timer.c:1745
 __run_timers kernel/time/timer.c:1726 [inline]
 run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1758
 __do_softirq+0x29b/0x9f6 kernel/softirq.c:345
 invoke_softirq kernel/softirq.c:221 [inline]
 __irq_exit_rcu kernel/softirq.c:422 [inline]
 irq_exit_rcu+0x134/0x200 kernel/softirq.c:434
 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1100
 </IRQ>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:632
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:191
Code: 74 24 10 e8 6a bd 4d f8 48 89 ef e8 a2 73 4e f8 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 <e8> 83 41 42 f8 65 8b 05 4c 07 f6 76 85 c0 74 0a 5b 5d c3 e8 f0 fc
RSP: 0018:ffffc9000111f9e8 EFLAGS: 00000206
RAX: 0000000000000002 RBX: 0000000000000200 RCX: 1ffffffff1b8bb31
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001
RBP: ffffffff8bfef320 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff8179e5a8 R11: 0000000000000000 R12: 0000000000000002
R13: 0000000000000293 R14: ffff888013b88000 R15: 0000000000000003
 ____bpf_trace_printk kernel/trace/bpf_trace.c:398 [inline]
 bpf_trace_printk+0x172/0x3a0 kernel/trace/bpf_trace.c:380
 bpf_prog_0605f9f479290f07+0x2f/0x7e8
 bpf_dispatcher_nop_func include/linux/bpf.h:684 [inline]
 bpf_test_run+0x45f/0xaa0 net/bpf/test_run.c:117
 bpf_prog_test_run_skb+0xabc/0x1c70 net/bpf/test_run.c:656
 bpf_prog_test_run kernel/bpf/syscall.c:3149 [inline]
 __do_sys_bpf+0x218b/0x4f40 kernel/bpf/syscall.c:4428
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43ff49
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffdb8cfd68 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000011ca4 RCX: 000000000043ff49
RDX: 0000000000000048 RSI: 0000000020000180 RDI: 000000000000000a
RBP: 0000000000000000 R08: 00007fffdb8cff08 R09: 00007fffdb8cff08
R10: 00007fffdb8cff08 R11: 0000000000000246 R12: 00007fffdb8cfd7c
R13: 431bde82d7b634db R14: 00000000004b0018 R15: 0000000000400488

Crashes (96):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/03 07:07 bpf-next 3733bfbbdd28 77e2b668 .config console log report syz C ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/24 02:56 upstream 6ebb6814a1ef 3c7fef33 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in bpf_bprintf_prepare
2021/05/20 13:01 upstream c3d0e3fd41b7 c560a65d .config console log report info ci-upstream-kasan-gce-root WARNING in bpf_bprintf_prepare
2021/05/12 02:17 net-old 297c4de6f780 b3c3bb8e .config console log report info ci-upstream-net-this-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/09 01:31 net-old b741596468b0 bc5434be .config console log report info ci-upstream-net-this-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/17 12:34 bpf-next 809ed84de8b3 aba2b2fb .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/17 10:50 bpf-next 809ed84de8b3 aba2b2fb .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/16 13:38 bpf-next 1f26622b791b c06f97ad .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/15 12:05 bpf-next ca16b429f39b 58636922 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/15 09:16 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/15 02:15 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/14 19:05 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/14 17:16 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/14 15:05 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/14 12:57 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/14 10:28 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/14 09:12 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/13 11:56 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/12 06:11 bpf-next ca16b429f39b 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/11 19:01 bpf-next 380afe720896 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/11 12:28 bpf-next 380afe720896 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/11 04:58 bpf-next 380afe720896 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/11 03:37 bpf-next 380afe720896 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/10 15:37 bpf-next 380afe720896 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/10 07:44 bpf-next 380afe720896 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/10 03:43 bpf-next 380afe720896 1ba81399 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/10 00:28 bpf-next 380afe720896 84fe5d96 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/09 05:54 bpf-next 380afe720896 5c2fe346 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/08 19:17 bpf-next cf68fa431d5d b718257f .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/08 14:47 bpf-next cf68fa431d5d b718257f .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/08 11:25 bpf-next cf68fa431d5d b718257f .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/08 06:23 bpf-next cf68fa431d5d b718257f .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/07 09:16 bpf-next cf68fa431d5d 500c2339 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/07 07:40 bpf-next cf68fa431d5d 500c2339 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/06 13:16 bpf-next cf68fa431d5d 500c2339 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/06 03:55 bpf-next cf68fa431d5d 500c2339 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/06 00:38 bpf-next cf68fa431d5d 500c2339 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/05 21:00 bpf-next cf68fa431d5d 500c2339 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/05 18:06 bpf-next cf68fa431d5d 500c2339 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/05 08:04 bpf-next cf68fa431d5d 500c2339 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/04 06:07 bpf-next 56b8b7f9533b 0740de69 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/04 03:11 bpf-next 56b8b7f9533b 0740de69 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/04 00:43 bpf-next 56b8b7f9533b 0740de69 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/03 21:51 bpf-next 56b8b7f9533b 0740de69 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/03 13:27 bpf-next 05924717ac70 0740de69 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/02 15:08 bpf-next 05924717ac70 0740de69 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/02 12:57 bpf-next 05924717ac70 0740de69 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/01 20:56 bpf-next 05924717ac70 032639db .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/01 12:37 bpf-next 05924717ac70 032639db .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/01 09:06 bpf-next e8e0f0f48478 032639db .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/06/01 03:29 bpf-next e8e0f0f48478 032639db .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/31 21:16 bpf-next e8e0f0f48478 032639db .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/31 14:38 bpf-next e8e0f0f48478 032639db .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/31 09:25 bpf-next e8e0f0f48478 325a8dab .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/31 07:23 bpf-next e8e0f0f48478 325a8dab .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/30 15:09 bpf-next e8e0f0f48478 325a8dab .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/30 07:20 bpf-next e8e0f0f48478 325a8dab .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/29 00:28 bpf-next e8e0f0f48478 858ea628 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/28 14:07 bpf-next d6a6a55518c1 858ea628 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/28 06:55 bpf-next d6a6a55518c1 858ea628 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/27 15:40 net-next-old 59c56342459a 858ea628 .config console log report info ci-upstream-net-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/26 12:15 bpf-next 21703cf790c7 54f0bcf1 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/21 04:53 bpf-next a49e72b3bda7 3c7fef33 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/20 16:49 bpf-next a49e72b3bda7 c560a65d .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/20 05:51 bpf-next 5d67f349590d a343ba6b .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/19 16:28 net-next-old 86544c3de6a2 a343ba6b .config console log report info ci-upstream-net-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/18 01:30 bpf-next f18ba26da88a a343ba6b .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/08 22:25 bpf-next 3733bfbbdd28 bc5434be .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/05 16:57 bpf-next 3733bfbbdd28 06c27ff5 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/05/03 05:19 bpf-next 3733bfbbdd28 77e2b668 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
2021/04/29 00:27 bpf-next 3733bfbbdd28 77e2b668 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING in bpf_bprintf_prepare
* Struck through repros no longer work on HEAD.