================================================================== BUG: KASAN: stack-out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:136 [inline] BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x17fc/0x1ef0 arch/x86/kernel/unwind_orc.c:455 Read of size 8 at addr ffffc900150b7b88 by task syz-executor.0/6163 CPU: 1 PID: 6163 Comm: syz-executor.0 Not tainted 6.2.0-rc8-next-20230220-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/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:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 user_mode arch/x86/include/asm/ptrace.h:136 [inline] unwind_next_frame+0x17fc/0x1ef0 arch/x86/kernel/unwind_orc.c:455 arch_stack_walk+0x81/0xf0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x90/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 irq_work_queue_on+0xd6/0x1a0 kernel/irq_work.c:140 irq_work_single+0x1e4/0x260 kernel/irq_work.c:211 __flush_smp_call_function_queue+0x4a3/0xad0 kernel/smp.c:668 __sysvec_call_function_single+0xce/0x4f0 arch/x86/kernel/smp.c:248 sysvec_call_function_single+0x92/0xc0 arch/x86/kernel/smp.c:243 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:653 RIP: 0010:finish_task_switch.isra.0+0x2bf/0xc80 kernel/sched/core.c:5183 Code: 8b 3a 4c 89 e7 48 c7 02 00 00 00 00 ff d1 4d 85 ff 75 bf 4c 89 e7 e8 10 f8 ff ff e8 ab 8f 32 00 fb 65 48 8b 1c 25 80 b8 03 00 <48> 8d bb 50 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RSP: 0018:ffffc900150b76f0 EFLAGS: 00000206 RAX: 000000000007aba9 RBX: ffff88807c6bba80 RCX: 1ffffffff1cf0bc1 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc900150b7738 R08: 0000000000000001 R09: 0000000000000001 R10: fffffbfff1cf11ca R11: 0000000000000000 R12: ffff8880b993c280 R13: ffff88807c6b8000 R14: 0000000000000000 R15: ffff8880b993ccb8 context_switch kernel/sched/core.c:5307 [inline] __schedule+0x24bc/0x5ac0 kernel/sched/core.c:6622 preempt_schedule_irq+0x52/0x90 kernel/sched/core.c:6934 irqentry_exit+0x35/0x80 kernel/entry/common.c:432 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:650 RIP: 0010:__unix_dgram_recvmsg+0x481/0xb90 net/unix/af_unix.c:2530 Code: 08 00 00 00 00 c7 40 14 00 00 00 00 48 8b 84 24 20 01 00 00 65 48 2b 04 25 28 00 00 00 0f 85 19 06 00 00 48 81 c4 28 01 00 00 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 7c 77 b6 f8 49 8d bc RSP: 0018:ffffc900150b79a0 EFLAGS: 00000296 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc90003f92000 RDX: 0000000000040000 RSI: ffffffff88ce2bee RDI: ffffc900150b77c0 RBP: ffff888022384280 R08: 0000000000000001 R09: ffffc900150b77c7 R10: fffff52002a16ef8 R11: 0000000000000000 R12: ffff88805da7f000 R13: 0000000000000000 R14: 0000000000000000 R15: ffffc900150b7940 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:650 RIP: 0046:___sys_recvmsg+0x0/0x180 net/socket.c:2755 RSP: 8164e53d:0000000000000001 EFLAGS: 00000000 ORIG_RAX: ffffffff8bfc3808 RAX: 0000000020246e80 RBX: 200eb098b4359b00 RCX: 00000000000091b7 RDX: ffffffff880cbb32 RSI: ffff888059097200 RDI: 0000000041b58ab3 RBP: 0000000000000000 R08: ffffc900150b7db0 R09: 0000000000000002 R10: 0000000000000000 R11: 1ffff92002a16f6e R12: ffffffff8a1611ad R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to stack of task syz-executor.0/6163 and is located at offset 24 in frame: ___sys_recvmsg+0x0/0x180 net/socket.c:2446 This frame has 3 objects: [32, 40) 'iov' [64, 72) 'uaddr' [96, 224) 'iovstack' The buggy address belongs to the virtual mapping at [ffffc900150b0000, ffffc900150b9000) created by: kernel_clone+0xeb/0xa10 kernel/fork.c:2684 The buggy address belongs to the physical page: page:ffffea0001e93d80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a4f6 memcg:ffff88802b2a1c82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88802b2a1c82 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 6041, tgid 6041 (syz-executor.2), ts 237093795400, free_ts 163049968984 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x11bb/0x2d50 mm/page_alloc.c:4339 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5605 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 vm_area_alloc_pages mm/vmalloc.c:2942 [inline] __vmalloc_area_node mm/vmalloc.c:3010 [inline] __vmalloc_node_range+0xb8a/0x1300 mm/vmalloc.c:3180 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct kernel/fork.c:984 [inline] copy_process+0x1320/0x76c0 kernel/fork.c:2100 kernel_clone+0xeb/0xa10 kernel/fork.c:2684 __do_sys_clone+0xba/0x100 kernel/fork.c:2825 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:1453 [inline] free_pcp_prepare+0x4de/0x930 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3401 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3496 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __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:769 [inline] slab_alloc_node mm/slub.c:3452 [inline] kmem_cache_alloc_node+0x183/0x350 mm/slub.c:3497 __alloc_skb+0x288/0x330 net/core/skbuff.c:598 alloc_skb include/linux/skbuff.h:1273 [inline] nlmsg_new include/net/netlink.h:1003 [inline] netlink_ack+0x357/0x1360 net/netlink/af_netlink.c:2511 netlink_rcv_skb+0x34f/0x440 net/netlink/af_netlink.c:2580 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:1942 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg+0xde/0x190 net/socket.c:745 __sys_sendto+0x23a/0x340 net/socket.c:2145 __do_sys_sendto net/socket.c:2157 [inline] __se_sys_sendto net/socket.c:2153 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2153 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: ffffc900150b7a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 ffffc900150b7b00: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 >ffffc900150b7b80: f1 f1 00 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00 ^ ffffc900150b7c00: 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 ffffc900150b7c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 8b 3a mov (%rdx),%edi 2: 4c 89 e7 mov %r12,%rdi 5: 48 c7 02 00 00 00 00 movq $0x0,(%rdx) c: ff d1 callq *%rcx e: 4d 85 ff test %r15,%r15 11: 75 bf jne 0xffffffd2 13: 4c 89 e7 mov %r12,%rdi 16: e8 10 f8 ff ff callq 0xfffff82b 1b: e8 ab 8f 32 00 callq 0x328fcb 20: fb sti 21: 65 48 8b 1c 25 80 b8 mov %gs:0x3b880,%rbx 28: 03 00 * 2a: 48 8d bb 50 15 00 00 lea 0x1550(%rbx),%rdi <-- trapping instruction 31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 38: fc ff df 3b: 48 89 fa mov %rdi,%rdx 3e: 48 rex.W 3f: c1 .byte 0xc1