================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0x118/0x130 arch/x86/kernel/time.c:44 Read of size 8 at addr ffffc90003bbef38 by task syz-executor405/5010 CPU: 1 PID: 5010 Comm: syz-executor405 Not tainted 6.4.0-rc5-syzkaller-00016-ga4d7d7011219 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 profile_pc+0x118/0x130 arch/x86/kernel/time.c:44 profile_tick+0xcd/0x130 kernel/profile.c:339 tick_sched_timer+0xee/0x110 kernel/time/tick-sched.c:1481 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x1c0/0xbe0 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x320/0x7b0 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline] __sysvec_apic_timer_interrupt+0x14a/0x430 arch/x86/kernel/apic/apic.c:1112 sysvec_apic_timer_interrupt+0x92/0xc0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0010:queued_write_lock_slowpath+0x14b/0x2d0 kernel/locking/qrwlock.c:85 Code: ff df 49 01 c7 41 83 c6 03 41 0f b6 07 41 38 c6 7c 08 84 c0 0f 85 46 01 00 00 8b 45 00 3d 00 01 00 00 74 19 f3 90 41 0f b6 07 <41> 38 c6 7c eb 84 c0 74 e7 48 89 ef e8 a4 85 c3 f7 eb dd 48 89 ef RSP: 0018:ffffc90003bbef30 EFLAGS: 00000206 RAX: 0000000000000000 RBX: 1ffff92000777de7 RCX: ffffffff8a13891d RDX: fffffbfff1c59621 RSI: 0000000000000004 RDI: ffffffff8e2cb100 RBP: ffffffff8e2cb100 R08: 0000000000000001 R09: ffffffff8e2cb103 R10: fffffbfff1c59620 R11: 0000000000094001 R12: ffffffff8e2cb104 R13: 00000000000000ff R14: 0000000000000003 R15: fffffbfff1c59620 queued_write_lock include/asm-generic/qrwlock.h:101 [inline] do_raw_write_lock+0x1d2/0x3b0 kernel/locking/spinlock_debug.c:210 neigh_parms_alloc+0x338/0x5f0 net/core/neighbour.c:1723 ipv6_add_dev+0x341/0x13b0 net/ipv6/addrconf.c:393 addrconf_notify+0x63d/0x19f0 net/ipv6/addrconf.c:3552 notifier_call_chain+0xb6/0x3c0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1935 call_netdevice_notifiers_extack net/core/dev.c:1973 [inline] call_netdevice_notifiers net/core/dev.c:1987 [inline] register_netdevice+0xfb4/0x1640 net/core/dev.c:10118 cfg80211_register_netdevice+0x157/0x330 net/wireless/core.c:1397 ieee80211_if_add+0x10e2/0x19a0 net/mac80211/iface.c:2209 ieee80211_register_hw+0x37e5/0x40e0 net/mac80211/main.c:1406 mac80211_hwsim_new_radio+0x26c1/0x4c10 drivers/net/wireless/virtual/mac80211_hwsim.c:5294 hwsim_new_radio_nl+0xacf/0x1210 drivers/net/wireless/virtual/mac80211_hwsim.c:5974 genl_family_rcv_msg_doit.isra.0+0x1e6/0x2d0 net/netlink/genetlink.c:968 genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline] genl_rcv_msg+0x4ff/0x7e0 net/netlink/genetlink.c:1065 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 __sys_sendto+0x23a/0x340 net/socket.c:2144 __do_sys_sendto net/socket.c:2156 [inline] __se_sys_sendto net/socket.c:2152 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2152 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fd51ae05a06 Code: 48 c7 c0 ff ff ff ff eb b7 66 2e 0f 1f 84 00 00 00 00 00 90 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 11 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 72 c3 90 55 48 83 ec 30 44 89 4c 24 2c 4c 89 RSP: 002b:00007ffc32565118 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fd51aec0480 RCX: 00007fd51ae05a06 RDX: 0000000000000024 RSI: 00007fd51aec04d0 RDI: 0000000000000003 RBP: 0000000000000001 R08: 00007ffc32565134 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd51aec04d0 R14: 0000000000000003 R15: 0000000000000000 The buggy address belongs to stack of task syz-executor405/5010 and is located at offset 0 in frame: queued_write_lock_slowpath+0x0/0x2d0 This frame has 1 object: [32, 36) 'val' The buggy address belongs to the virtual mapping at [ffffc90003bb8000, ffffc90003bc1000) created by: kernel_clone+0xeb/0x890 kernel/fork.c:2915 The buggy address belongs to the physical page: page:ffffea0000b0b3c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c2cf flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 5004, tgid 5004 (syz-executor405), ts 40572539763, free_ts 21386954771 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 vm_area_alloc_pages mm/vmalloc.c:3009 [inline] __vmalloc_area_node mm/vmalloc.c:3085 [inline] __vmalloc_node_range+0xb1c/0x14a0 mm/vmalloc.c:3257 alloc_thread_stack_node kernel/fork.c:313 [inline] dup_task_struct kernel/fork.c:1116 [inline] copy_process+0x13bb/0x75c0 kernel/fork.c:2333 kernel_clone+0xeb/0x890 kernel/fork.c:2915 __do_sys_clone+0xba/0x100 kernel/fork.c:3058 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page+0x33/0x370 mm/page_alloc.c:2659 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2636 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slub.c:3451 [inline] __kmem_cache_alloc_node+0x17c/0x320 mm/slub.c:3490 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] ext4_htree_create_dir_info fs/ext4/dir.c:438 [inline] ext4_dx_readdir fs/ext4/dir.c:556 [inline] ext4_readdir+0x246c/0x35f0 fs/ext4/dir.c:142 iterate_dir+0x56e/0x6f0 fs/readdir.c:65 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __x64_sys_getdents64+0x13e/0x2c0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffffc90003bbee00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90003bbee80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90003bbef00: 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3 00 ^ ffffc90003bbef80: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 ffffc90003bbf000: f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: df 49 01 fisttps 0x1(%rcx) 3: c7 41 83 c6 03 41 0f movl $0xf4103c6,-0x7d(%rcx) a: b6 07 mov $0x7,%dh c: 41 38 c6 cmp %al,%r14b f: 7c 08 jl 0x19 11: 84 c0 test %al,%al 13: 0f 85 46 01 00 00 jne 0x15f 19: 8b 45 00 mov 0x0(%rbp),%eax 1c: 3d 00 01 00 00 cmp $0x100,%eax 21: 74 19 je 0x3c 23: f3 90 pause 25: 41 0f b6 07 movzbl (%r15),%eax * 29: 41 38 c6 cmp %al,%r14b <-- trapping instruction 2c: 7c eb jl 0x19 2e: 84 c0 test %al,%al 30: 74 e7 je 0x19 32: 48 89 ef mov %rbp,%rdi 35: e8 a4 85 c3 f7 callq 0xf7c385de 3a: eb dd jmp 0x19 3c: 48 89 ef mov %rbp,%rdi