ci starts bisection 2022-12-28 00:27:26.486381407 +0000 UTC m=+27997.029087003 bisecting fixing commit since 972a278fe60c361eb8f37619f562f092e8786d7c building syzkaller on 95cb00d1ffccfb9043ac5d91ff8103bbb9befae8 ensuring issue is reproducible on original commit 972a278fe60c361eb8f37619f562f092e8786d7c testing commit 972a278fe60c361eb8f37619f562f092e8786d7c gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: b255eb39e7d6e4d075adeb099ab15f2e445e207deaa6e54ba80a53d4e7f36cbb all runs: crashed: KASAN: use-after-free Read in kill_fasync testing current HEAD 1b929c02afd37871d5afb9d498426f83432e71c2 testing commit 1b929c02afd37871d5afb9d498426f83432e71c2 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 019e36bd9a3637c03d4b67d3a3a65bf9d46b4211d3dc55cf17e62e6564aecb0c all runs: crashed: KASAN: stack-out-of-bounds Read in post_one_notification revisions tested: 2, total time: 29m32.416939784s (build: 15m18.113978925s, test: 13m15.754468164s) the crash still happens on HEAD commit msg: Linux 6.2-rc1 crash: KASAN: stack-out-of-bounds Read in post_one_notification ================================================================== BUG: KASAN: stack-out-of-bounds in post_one_notification.isra.0+0x3db/0x850 kernel/watch_queue.c:128 Read of size 48 at addr ffffc9000e8f7d40 by task syz-executor217/31075 CPU: 0 PID: 31075 Comm: syz-executor217 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x45d mm/kasan/report.c:417 kasan_report+0xbb/0x1f0 mm/kasan/report.c:517 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memcpy+0x20/0x60 mm/kasan/shadow.c:65 post_one_notification.isra.0+0x3db/0x850 kernel/watch_queue.c:128 __post_watch_notification kernel/watch_queue.c:229 [inline] __post_watch_notification+0x459/0x800 kernel/watch_queue.c:198 post_watch_notification include/linux/watch_queue.h:109 [inline] notify_key security/keys/internal.h:197 [inline] __key_update security/keys/key.c:775 [inline] key_create_or_update+0xa84/0xbe0 security/keys/key.c:979 __do_sys_add_key+0x156/0x300 security/keys/keyctl.c:134 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fdbef7a8f39 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe1b9fb308 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fdbef7a8f39 RDX: 0000000020000280 RSI: 0000000020000100 RDI: 00000000200000c0 RBP: 0000000000000000 R08: 00000000fffffffc R09: 0000000000000001 R10: 0000000000000048 R11: 0000000000000246 R12: 00000000000799fd R13: 00007ffe1b9fb31c R14: 00007ffe1b9fb330 R15: 00007ffe1b9fb320 The buggy address belongs to stack of task syz-executor217/31075 and is located at offset 64 in frame: key_create_or_update+0x0/0xbe0 include/linux/rbtree.h:63 This frame has 4 objects: [32, 40) 'edit' [64, 80) 'n' [96, 136) 'index_key' [176, 256) 'prep' The buggy address belongs to the virtual mapping at [ffffc9000e8f0000, ffffc9000e8f9000) created by: kernel_clone+0xb8/0x720 kernel/fork.c:2681 The buggy address belongs to the physical page: page:ffffea00006e90c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ba43 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) 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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 10230, tgid 10230 (syz-executor217), ts 498187342812, free_ts 498186197472 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5549 vm_area_alloc_pages mm/vmalloc.c:2989 [inline] __vmalloc_area_node mm/vmalloc.c:3057 [inline] __vmalloc_node_range+0x712/0x1010 mm/vmalloc.c:3227 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct kernel/fork.c:987 [inline] copy_process+0x10a9/0x6bb0 kernel/fork.c:2097 kernel_clone+0xb8/0x720 kernel/fork.c:2681 __do_sys_clone+0xa1/0xe0 kernel/fork.c:2822 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/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:1446 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page_list+0x172/0xcc0 mm/page_alloc.c:3510 release_pages+0x31c/0x10c0 mm/swap.c:1076 tlb_batch_pages_flush+0x85/0x160 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x110/0x6c0 mm/mmu_gather.c:391 exit_mmap+0x1c9/0x610 mm/mmap.c:3096 __mmput+0xf3/0x440 kernel/fork.c:1207 exit_mm kernel/exit.c:563 [inline] do_exit+0x86f/0x2460 kernel/exit.c:854 do_group_exit+0xb0/0x250 kernel/exit.c:1012 __do_sys_exit_group kernel/exit.c:1023 [inline] __se_sys_exit_group kernel/exit.c:1021 [inline] __x64_sys_exit_group+0x35/0x40 kernel/exit.c:1021 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffffc9000e8f7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000e8f7c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000e8f7d00: f1 f1 f1 f1 00 f2 f2 f2 00 00 f2 f2 00 00 00 00 ^ ffffc9000e8f7d80: 00 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 ffffc9000e8f7e00: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================