==================================================================
BUG: KASAN: slab-out-of-bounds in __bpf_get_stackid+0xa04/0xcf0 kernel/bpf/stackmap.c:288
Write of size 400 at addr ffff88802aa38890 by task syz.1.50/6140
CPU: 0 UID: 0 PID: 6140 Comm: syz.1.50 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:200
 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106
 __bpf_get_stackid+0xa04/0xcf0 kernel/bpf/stackmap.c:288
 ____bpf_get_stackid_raw_tp kernel/trace/bpf_trace.c:1628 [inline]
 bpf_get_stackid_raw_tp+0x196/0x210 kernel/trace/bpf_trace.c:1617
 bpf_prog_c275e343cfb0564f+0x2a/0x32
 bpf_dispatcher_nop_func include/linux/bpf.h:1350 [inline]
 __bpf_prog_run include/linux/filter.h:721 [inline]
 bpf_prog_run include/linux/filter.h:728 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2075 [inline]
 bpf_trace_run4+0x28e/0x4a0 kernel/trace/bpf_trace.c:2118
 __bpf_trace_fib6_table_lookup+0x188/0x1f0 include/trace/events/fib6.h:13
 __traceiter_fib6_table_lookup+0x8c/0xe0 include/trace/events/fib6.h:13
 __do_trace_fib6_table_lookup include/trace/events/fib6.h:13 [inline]
 trace_fib6_table_lookup+0x18b/0x1f0 include/trace/events/fib6.h:13
 fib6_table_lookup+0xa23/0xa80 net/ipv6/route.c:2246
 ip6_pol_route+0x222/0x1180 net/ipv6/route.c:2269
 pol_lookup_func include/net/ip6_fib.h:617 [inline]
 fib6_rule_lookup+0x52f/0x6f0 net/ipv6/fib6_rules.c:120
 ip6_route_input_lookup net/ipv6/route.c:2338 [inline]
 ip6_route_input+0x6de/0xad0 net/ipv6/route.c:2641
 ip6_rcv_finish+0x141/0x2e0 net/ipv6/ip6_input.c:77
 NF_HOOK+0x30c/0x3a0 include/linux/netfilter.h:318
 __netif_receive_skb_one_core net/core/dev.c:6079 [inline]
 __netif_receive_skb+0xd3/0x380 net/core/dev.c:6192
 process_backlog+0x60e/0x14f0 net/core/dev.c:6544
 __napi_poll+0xc7/0x360 net/core/dev.c:7594
 napi_poll net/core/dev.c:7657 [inline]
 net_rx_action+0x5f7/0xdf0 net/core/dev.c:7784
 handle_softirqs+0x283/0x870 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:1052 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
 
 
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__schedule+0x0/0x4cc0 kernel/sched/core.c:6785
Code: dc f6 45 89 f8 89 d9 48 8b 5c 24 08 e9 ee fe ff ff cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90  0f 1e fa 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48
RSP: 0018:ffffc9000aebf2d8 EFLAGS: 00000246
RAX: 1ffff1100561166c RBX: ffffffff8b48491e RCX: 316f913fdc97d000
RDX: 0000000000000000 RSI: ffffffff8bc060c0 RDI: 0000000000000001
RBP: ffffc9000aebf378 R08: ffffffff8f9db437 R09: 1ffffffff1f3b686
R10: dffffc0000000000 R11: fffffbfff1f3b687 R12: 1ffff920015d7e7c
R13: ffff8880598400f0 R14: ffff88802b08b360 R15: dffffc0000000000
 preempt_schedule_common+0x83/0xd0 kernel/sched/core.c:7113
 preempt_schedule+0xae/0xc0 kernel/sched/core.c:7137
 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk.S:12
 __down_write_common kernel/locking/rwsem.c:1320 [inline]
 __down_write kernel/locking/rwsem.c:1326 [inline]
 down_write+0x1b2/0x1f0 kernel/locking/rwsem.c:1591
 kernfs_link_sibling+0x2fb/0x3e0 fs/kernfs/dir.c:394
 kernfs_add_one+0x1e0/0x520 fs/kernfs/dir.c:810
 __kernfs_create_file+0x22b/0x2e0 fs/kernfs/file.c:1086
 cgroup_add_file kernel/cgroup/cgroup.c:4421 [inline]
 cgroup_addrm_files+0x7f2/0xb20 kernel/cgroup/cgroup.c:4475
 css_populate_dir+0x124/0x3d0 kernel/cgroup/cgroup.c:1834
 cgroup_apply_control_enable+0x58a/0xa80 kernel/cgroup/cgroup.c:3399
 cgroup_apply_control+0x92/0x6e0 kernel/cgroup/cgroup.c:3473
 cgroup_subtree_control_write+0xaa1/0x1090 kernel/cgroup/cgroup.c:3627
 cgroup_file_write+0x39e/0x740 kernel/cgroup/cgroup.c:4312
 kernfs_fop_write_iter+0x3ac/0x540 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x5c6/0xb30 fs/read_write.c:686
 ksys_write+0x145/0x250 fs/read_write.c:738
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f00c538eec9
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:00007f00c62b5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f00c55e5fa0 RCX: 00007f00c538eec9
RDX: 0000000000000006 RSI: 0000200000000100 RDI: 000000000000000e
RBP: 00007f00c5411f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f00c55e6038 R14: 00007f00c55e5fa0 R15: 00007ffd7b340208
 
Allocated by task 6140:
 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:400 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417
 kasan_kmalloc include/linux/kasan.h:262 [inline]
 __do_kmalloc_node mm/slub.c:5603 [inline]
 __kmalloc_node_noprof+0x56d/0x800 mm/slub.c:5609
 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
 prealloc_elems_and_freelist+0x86/0x1d0 kernel/bpf/stackmap.c:51
 stack_map_alloc+0x33f/0x4c0 kernel/bpf/stackmap.c:114
 map_create+0xaa3/0x1640 kernel/bpf/syscall.c:1497
 __sys_bpf+0x5f0/0x860 kernel/bpf/syscall.c:6116
 __do_sys_bpf kernel/bpf/syscall.c:6244 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:6242 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6242
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88802aa38880
 which belongs to the cache kmalloc-cg-32 of size 32
The buggy address is located 16 bytes inside of
 allocated 24-byte region [ffff88802aa38880, ffff88802aa38898)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2aa38
memcg:ffff88802f585401
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88813ffaeb40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000080400040 00000000f5000000 ffff88802f585401
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 12, tgid 12 (kworker/u8:0), ts 21473124568, free_ts 0
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
 prep_new_page mm/page_alloc.c:1858 [inline]
 get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
 alloc_slab_page mm/slub.c:3030 [inline]
 allocate_slab+0x96/0x3a0 mm/slub.c:3203
 new_slab mm/slub.c:3257 [inline]
 ___slab_alloc+0xe94/0x1920 mm/slub.c:4627
 __slab_alloc+0x65/0x100 mm/slub.c:4746
 __slab_alloc_node mm/slub.c:4822 [inline]
 slab_alloc_node mm/slub.c:5233 [inline]
 __do_kmalloc_node mm/slub.c:5602 [inline]
 __kmalloc_noprof+0x471/0x7f0 mm/slub.c:5615
 kmalloc_noprof include/linux/slab.h:961 [inline]
 kzalloc_noprof include/linux/slab.h:1094 [inline]
 lsm_blob_alloc security/security.c:690 [inline]
 lsm_cred_alloc security/security.c:707 [inline]
 security_prepare_creds+0x52/0x390 security/security.c:3310
 prepare_creds+0x497/0x6c0 kernel/cred.c:242
 copy_creds+0x106/0xa10 kernel/cred.c:312
 copy_process+0x964/0x3c00 kernel/fork.c:2046
 kernel_clone+0x21e/0x840 kernel/fork.c:2609
 user_mode_thread+0xdd/0x140 kernel/fork.c:2685
 call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171
 process_one_work kernel/workqueue.c:3263 [inline]
 process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3346
page_owner free stack trace missing
Memory state around the buggy address:
 ffff88802aa38780: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
 ffff88802aa38800: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
>ffff88802aa38880: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
                            ^
 ffff88802aa38900: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
 ffff88802aa38980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
   0:	dc f6                	fdiv   %st,%st(6)
   2:	45 89 f8             	mov    %r15d,%r8d
   5:	89 d9                	mov    %ebx,%ecx
   7:	48 8b 5c 24 08       	mov    0x8(%rsp),%rbx
   c:	e9 ee fe ff ff       	jmp    0xfffffeff
  11:	cc                   	int3
  12:	cc                   	int3
  13:	cc                   	int3
  14:	cc                   	int3
  15:	cc                   	int3
  16:	cc                   	int3
  17:	cc                   	int3
  18:	cc                   	int3
  19:	cc                   	int3
  1a:	90                   	nop
  1b:	90                   	nop
  1c:	90                   	nop
  1d:	90                   	nop
  1e:	90                   	nop
  1f:	90                   	nop
  20:	90                   	nop
  21:	90                   	nop
  22:	90                   	nop
  23:	90                   	nop
  24:	90                   	nop
  25:	90                   	nop
  26:	90                   	nop
  27:	90                   	nop
  28:	90                   	nop
  29:	90                   	nop
* 2a:	f3 0f 1e fa          	endbr64 <-- trapping instruction
  2e:	55                   	push   %rbp
  2f:	48 89 e5             	mov    %rsp,%rbp
  32:	41 57                	push   %r15
  34:	41 56                	push   %r14
  36:	41 55                	push   %r13
  38:	41 54                	push   %r12
  3a:	53                   	push   %rbx
  3b:	48 83 e4 e0          	and    $0xffffffffffffffe0,%rsp
  3f:	48                   	rex.W