================================================================== BUG: KASAN: slab-out-of-bounds in strnchr+0x5e/0x80 lib/string.c:405 Read of size 1 at addr ffff88802873b3b0 by task swapper/0/0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 strnchr+0x5e/0x80 lib/string.c:405 bpf_bprintf_prepare+0x167/0x13d0 kernel/bpf/helpers.c:829 ____bpf_snprintf kernel/bpf/helpers.c:1065 [inline] bpf_snprintf+0xd3/0x1b0 kernel/bpf/helpers.c:1049 bpf_prog_c2925c0a7ac12d80+0x58/0x60 bpf_dispatcher_nop_func include/linux/bpf.h:1394 [inline] __bpf_prog_run include/linux/filter.h:723 [inline] bpf_prog_run include/linux/filter.h:730 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2075 [inline] bpf_trace_run1+0x27f/0x4c0 kernel/trace/bpf_trace.c:2115 __bpf_trace_rcu_utilization+0xa1/0xf0 include/trace/events/rcu.h:27 __do_trace_rcu_utilization include/trace/events/rcu.h:27 [inline] trace_rcu_utilization+0x191/0x1c0 include/trace/events/rcu.h:27 rcu_core+0x130/0x1870 kernel/rcu/tree.c:2830 handle_softirqs+0x27d/0x850 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:82 Code: cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 93 50 0c 00 f3 0f 1e fa fb f4 c8 ed 02 00 cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffffff8dc07d80 EFLAGS: 000002c6 RAX: f552fd969d6f2500 RBX: ffffffff81978fba RCX: f552fd969d6f2500 RDX: 0000000000000001 RSI: ffffffff8d792d97 RDI: ffffffff8bc086e0 RBP: ffffffff8dc07ea8 R08: ffff8880b86336db R09: 1ffff110170c66db R10: dffffc0000000000 R11: ffffed10170c66dc R12: ffffffff8f822370 R13: 1ffffffff1b92a68 R14: 0000000000000000 R15: 0000000000000000 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline] default_idle+0x13/0x20 arch/x86/kernel/process.c:767 default_idle_call+0x73/0xb0 kernel/sched/idle.c:122 cpuidle_idle_call kernel/sched/idle.c:191 [inline] do_idle+0x1ea/0x520 kernel/sched/idle.c:332 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:430 rest_init+0x2de/0x300 init/main.c:757 start_kernel+0x3a7/0x400 init/main.c:1206 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291 common_startup_64+0x13e/0x147 Allocated by task 6003: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:397 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:414 kasan_kmalloc include/linux/kasan.h:262 [inline] __do_kmalloc_node mm/slub.c:5657 [inline] __kmalloc_node_noprof+0x57a/0x820 mm/slub.c:5663 kmalloc_node_noprof include/linux/slab.h:987 [inline] __bpf_map_area_alloc kernel/bpf/syscall.c:395 [inline] bpf_map_area_alloc+0x64/0x180 kernel/bpf/syscall.c:408 insn_array_alloc+0x52/0x140 kernel/bpf/bpf_insn_array.c:49 map_create+0xafd/0x16a0 kernel/bpf/syscall.c:1514 __sys_bpf+0x682/0x8a0 kernel/bpf/syscall.c:6189 __do_sys_bpf kernel/bpf/syscall.c:6320 [inline] __se_sys_bpf kernel/bpf/syscall.c:6318 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6318 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88802873b000 which belongs to the cache kmalloc-cg-1k of size 1024 The buggy address is located 0 bytes to the right of allocated 944-byte region [ffff88802873b000, ffff88802873b3b0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x28738 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880761bbc01 ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813ffb0280 ffffea0000a76e00 dead000000000003 raw: 0000000000000000 0000000080100010 00000000f5000000 ffff8880761bbc01 head: 00fff00000000040 ffff88813ffb0280 ffffea0000a76e00 dead000000000003 head: 0000000000000000 0000000080100010 00000000f5000000 ffff8880761bbc01 head: 00fff00000000003 ffffea0000a1ce01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5496, tgid 5496 (dhcpcd), ts 57027219415, free_ts 56926940909 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xf2b/0x1960 mm/slub.c:4656 __slab_alloc+0x65/0x100 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] __do_kmalloc_node mm/slub.c:5656 [inline] __kmalloc_node_track_caller_noprof+0x5d4/0x820 mm/slub.c:5764 kmalloc_reserve+0x136/0x290 net/core/skbuff.c:608 __alloc_skb+0x27e/0x430 net/core/skbuff.c:690 alloc_skb include/linux/skbuff.h:1383 [inline] alloc_skb_with_frags+0xca/0x890 net/core/skbuff.c:6712 sock_alloc_send_pskb+0x84d/0x980 net/core/sock.c:2995 unix_dgram_sendmsg+0x454/0x1840 net/unix/af_unix.c:2130 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg+0x21c/0x270 net/socket.c:742 sock_write_iter+0x279/0x360 net/socket.c:1195 do_iter_readv_writev+0x623/0x8c0 fs/read_write.c:-1 page last free pid 5662 tgid 5662 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 discard_slab mm/slub.c:3346 [inline] __put_partials+0x146/0x170 mm/slub.c:3886 put_cpu_partial+0x1f2/0x2d0 mm/slub.c:3961 __slab_free+0x288/0x2a0 mm/slub.c:5952 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:349 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_noprof+0x37d/0x710 mm/slub.c:5270 proc_reg_open+0x1f4/0x540 fs/proc/inode.c:502 do_dentry_open+0x7ce/0x1420 fs/open.c:962 vfs_open+0x3b/0x340 fs/open.c:1094 do_open fs/namei.c:4628 [inline] path_openat+0x340e/0x3dd0 fs/namei.c:4787 do_filp_open+0x1fa/0x410 fs/namei.c:4814 do_sys_openat2+0x121/0x200 fs/open.c:1430 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1447 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 Memory state around the buggy address: ffff88802873b280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802873b300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802873b380: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ^ ffff88802873b400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802873b480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: cc int3 1: cc int3 2: cc int3 3: cc int3 4: cc int3 5: cc int3 6: cc int3 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: f3 0f 1e fa endbr64 1b: 66 90 xchg %ax,%ax 1d: 0f 00 2d 93 50 0c 00 verw 0xc5093(%rip) # 0xc50b7 24: f3 0f 1e fa endbr64 28: fb sti 29: f4 hlt * 2a: e9 c8 ed 02 00 jmp 0x2edf7 <-- trapping instruction 2f: cc int3 30: cc int3 31: cc int3 32: cc int3 33: cc int3 34: cc int3 35: cc int3 36: cc int3 37: 90 nop 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop