================================================================================ UBSAN: array-index-out-of-bounds in kernel/bpf/helpers.c:776:13 index -151 is out of range for type 'char[3][512]' CPU: 0 PID: 14162 Comm: syz-executor.0 Tainted: G W 6.1.75-syzkaller-00077-g1d37bc9913cc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 dump_stack+0x15/0x1b lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0x13a/0x160 lib/ubsan.c:282 try_get_fmt_tmp_buf kernel/bpf/helpers.c:776 [inline] bpf_bprintf_prepare+0x132e/0x1360 kernel/bpf/helpers.c:818 ____bpf_trace_printk kernel/trace/bpf_trace.c:385 [inline] bpf_trace_printk+0x14a/0x300 kernel/trace/bpf_trace.c:376 bpf_prog_d72730ee5218b4bb+0x35/0x58 bpf_dispatcher_nop_func include/linux/bpf.h:987 [inline] __bpf_prog_run include/linux/filter.h:600 [inline] bpf_prog_run include/linux/filter.h:607 [inline] bpf_test_run+0x4ab/0xa40 net/bpf/test_run.c:402 bpf_prog_test_run_skb+0xaf1/0x13a0 net/bpf/test_run.c:1180 bpf_prog_test_run+0x3b0/0x630 kernel/bpf/syscall.c:3644 __sys_bpf+0x59f/0x7f0 kernel/bpf/syscall.c:4999 __do_sys_bpf kernel/bpf/syscall.c:5085 [inline] __se_sys_bpf kernel/bpf/syscall.c:5083 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5083 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f2891a7dea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f289271c0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f2891babf80 RCX: 00007f2891a7dea9 RDX: 000000000000004c RSI: 0000000020000240 RDI: 000000000000000a RBP: 00007f2891aca4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f2891babf80 R15: 00007ffc94c67b58 ================================================================================ BUG: using smp_processor_id() in preemptible [00000000] code: syz-executor.0/14162 caller is debug_smp_processor_id+0x17/0x20 lib/smp_processor_id.c:60 CPU: 0 PID: 14162 Comm: syz-executor.0 Tainted: G W 6.1.75-syzkaller-00077-g1d37bc9913cc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 dump_stack+0x15/0x1b lib/dump_stack.c:113 check_preemption_disabled+0x109/0x110 lib/smp_processor_id.c:49 debug_smp_processor_id+0x17/0x20 lib/smp_processor_id.c:60 migrate_enable+0x178/0x2b0 kernel/sched/core.c:2465 bpf_test_timer_leave net/bpf/test_run.c:53 [inline] bpf_test_run+0x89a/0xa40 net/bpf/test_run.c:405 bpf_prog_test_run_skb+0xaf1/0x13a0 net/bpf/test_run.c:1180 bpf_prog_test_run+0x3b0/0x630 kernel/bpf/syscall.c:3644 __sys_bpf+0x59f/0x7f0 kernel/bpf/syscall.c:4999 __do_sys_bpf kernel/bpf/syscall.c:5085 [inline] __se_sys_bpf kernel/bpf/syscall.c:5083 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5083 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f2891a7dea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f289271c0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f2891babf80 RCX: 00007f2891a7dea9 RDX: 000000000000004c RSI: 0000000020000240 RDI: 000000000000000a RBP: 00007f2891aca4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f2891babf80 R15: 00007ffc94c67b58