================================================================== BUG: KASAN: slab-out-of-bounds in strnchr+0x5e/0x80 lib/string.c:405 Read of size 1 at addr ffff8880799443b0 by task syz.3.1483/12173 CPU: 0 UID: 0 PID: 12173 Comm: syz.3.1483 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_note_context_switch+0xc9/0x1120 kernel/rcu/tree_plugin.h:330 __schedule+0x346/0x5000 kernel/sched/core.c:6748 preempt_schedule_common+0x83/0xd0 kernel/sched/core.c:7047 preempt_schedule+0xae/0xc0 kernel/sched/core.c:7071 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk.S:12 class_preempt_destructor include/linux/preempt.h:468 [inline] try_to_wake_up+0x82b/0x12b0 kernel/sched/core.c:4225 wake_up_process kernel/sched/core.c:4349 [inline] wake_up_q+0x85/0xd0 kernel/sched/core.c:1087 futex_wake+0x4a0/0x560 kernel/futex/waitwake.c:198 do_futex+0x395/0x420 kernel/futex/syscalls.c:135 __do_sys_futex kernel/futex/syscalls.c:207 [inline] __se_sys_futex+0x36f/0x400 kernel/futex/syscalls.c:188 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 RIP: 0033:0x7f89fb18f749 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f89fc0050e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f89fb3e5fa8 RCX: 00007f89fb18f749 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f89fb3e5fac RBP: 00007f89fb3e5fa0 R08: 3fffffffffffffff R09: 0000000000000000 R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f89fb3e6038 R14: 00007ffe28be1090 R15: 00007ffe28be1178 Allocated by task 12173: 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 ffff888079944000 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 [ffff888079944000, ffff8880799443b0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79940 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888044967e01 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813ffb0280 ffffea0000d46800 0000000000000002 raw: 0000000000000000 0000000080100010 00000000f5000000 ffff888044967e01 head: 00fff00000000040 ffff88813ffb0280 ffffea0000d46800 0000000000000002 head: 0000000000000000 0000000080100010 00000000f5000000 ffff888044967e01 head: 00fff00000000003 ffffea0001e65001 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 10531, tgid 10531 (syz-executor), ts 439603500903, free_ts 387549951999 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_noprof+0x47d/0x800 mm/slub.c:5669 kmalloc_noprof include/linux/slab.h:961 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] __register_sysctl_table+0x72/0x1340 fs/proc/proc_sysctl.c:1379 neigh_sysctl_register+0x9a2/0xa80 net/core/neighbour.c:3886 addrconf_sysctl_register+0xb3/0x1c0 net/ipv6/addrconf.c:7367 ipv6_add_dev+0xd26/0x13a0 net/ipv6/addrconf.c:460 addrconf_notify+0x771/0x1050 net/ipv6/addrconf.c:3650 notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] register_netdevice+0x15bd/0x1a70 net/core/dev.c:11429 virt_wifi_newlink+0x428/0x860 drivers/net/wireless/virtual/virt_wifi.c:571 page last free pid 10355 tgid 10350 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 ptlock_alloc+0x20/0x70 mm/memory.c:7377 ptlock_init include/linux/mm.h:3280 [inline] pagetable_pte_ctor include/linux/mm.h:3334 [inline] __pte_alloc_one_noprof include/asm-generic/pgalloc.h:79 [inline] pte_alloc_one+0x7a/0x370 arch/x86/mm/pgtable.c:18 __pte_alloc+0x25/0x1a0 mm/memory.c:453 copy_pte_range mm/memory.c:1237 [inline] copy_pmd_range+0x76cc/0x7e00 mm/memory.c:1392 copy_pud_range mm/memory.c:1429 [inline] copy_p4d_range mm/memory.c:1453 [inline] copy_page_range+0xb88/0x11d0 mm/memory.c:1535 dup_mmap+0xf4a/0x1b80 mm/mmap.c:1827 dup_mm kernel/fork.c:1529 [inline] copy_mm+0x13c/0x4b0 kernel/fork.c:1581 copy_process+0x165d/0x3950 kernel/fork.c:2221 Memory state around the buggy address: ffff888079944280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888079944300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888079944380: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ^ ffff888079944400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888079944480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================