================================================================================ UBSAN: array-index-out-of-bounds in kernel/bpf/helpers.c:776:13 index -1 is out of range for type 'char[3][512]' CPU: 0 PID: 101 Comm: udevd Not tainted 6.1.68-syzkaller-00029-g8c0f9174731d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/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_cfddb232a7dfb698+0x2f/0x33 bpf_dispatcher_nop_func include/linux/bpf.h:982 [inline] __bpf_prog_run include/linux/filter.h:600 [inline] bpf_prog_run include/linux/filter.h:607 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2275 [inline] bpf_trace_run3+0x177/0x2e0 kernel/trace/bpf_trace.c:2315 __bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:114 trace_kmem_cache_free include/trace/events/kmem.h:114 [inline] kmem_cache_free+0x4e7/0x510 mm/slub.c:3705 putname+0xfa/0x150 fs/namei.c:271 do_sys_openat2+0x466/0x850 fs/open.c:1350 do_sys_open fs/open.c:1357 [inline] __do_sys_openat fs/open.c:1373 [inline] __se_sys_openat fs/open.c:1368 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1368 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:0x7face6994477 Code: 10 00 00 00 44 8b 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 44 89 c2 4c 89 ce bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 82 69 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffeada96128 EFLAGS: 00000287 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000055f42e8843e0 RCX: 00007face6994477 RDX: 0000000000090800 RSI: 000055f42e877540 RDI: 00000000ffffff9c RBP: 000055f42e8f9810 R08: 0000000000090800 R09: 000055f42e877540 R10: 0000000000000000 R11: 0000000000000287 R12: 000055f42e877540 R13: 00000000000000ff R14: 000055f42dd851c4 R15: 0000000000000000 ================================================================================ BUG: scheduling while atomic: udevd/101/0x00000002 Modules linked in: Preemption disabled at: [] rcu_read_lock_sched include/linux/rcupdate.h:846 [inline] [] fd_install+0x59/0x250 fs/file.c:607 CPU: 0 PID: 101 Comm: udevd Not tainted 6.1.68-syzkaller-00029-g8c0f9174731d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/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 __schedule_bug+0x195/0x260 kernel/sched/core.c:5960 schedule_debug kernel/sched/core.c:5987 [inline] __schedule+0xce9/0x1540 kernel/sched/core.c:6622 schedule+0xc3/0x180 kernel/sched/core.c:6805 exit_to_user_mode_loop+0x4e/0xa0 kernel/entry/common.c:159 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7face6994477 Code: 10 00 00 00 44 8b 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 44 89 c2 4c 89 ce bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 82 69 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffeada96128 EFLAGS: 00000287 ORIG_RAX: 0000000000000101 RAX: 000000000000000d RBX: 000055f42e8843e0 RCX: 00007face6994477 RDX: 0000000000090800 RSI: 000055f42e877540 RDI: 00000000ffffff9c RBP: 000055f42e8f9810 R08: 0000000000090800 R09: 000055f42e877540 R10: 0000000000000000 R11: 0000000000000287 R12: 000055f42e877540 R13: 00000000000000ff R14: 000055f42dd851c4 R15: 0000000000000000