ci starts bisection 2023-01-31 04:19:53.046059385 +0000 UTC m=+724106.992121452 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: f732951bd22e4f3652c1f0088a0d2e59ddf1c4232ca9e96516967ef050776475 all runs: crashed: KASAN: use-after-free Read in kill_fasync testing current HEAD c0b67534c95c537f7a506a06b98e5e85d72e2b7d testing commit c0b67534c95c537f7a506a06b98e5e85d72e2b7d gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 2365e63328ab8edf97abf94b2817af8a3e29818b564a46a186172fbeab203f14 all runs: crashed: KASAN: stack-out-of-bounds Read in post_one_notification revisions tested: 2, total time: 25m41.879553262s (build: 12m41.952792857s, test: 12m16.048535568s) the crash still happens on HEAD commit msg: Merge tag 'cgroup-for-6.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 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 80 at addr ffffc90004d17d40 by task syz-executor170/23630 CPU: 1 PID: 23630 Comm: syz-executor170 Not tainted 6.2.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 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:0x7fe6418caf39 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:00007ffcae40c668 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fe6418caf39 RDX: 0000000020000280 RSI: 0000000020000100 RDI: 00000000200000c0 RBP: 0000000000000000 R08: 00000000fffffffc R09: 0000000000000001 R10: 0000000000000048 R11: 0000000000000246 R12: 0000000000077cd9 R13: 00007ffcae40c67c R14: 00007ffcae40c690 R15: 00007ffcae40c680 The buggy address belongs to stack of task syz-executor170/23630 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 [ffffc90004d10000, ffffc90004d19000) created by: kernel_clone+0xb8/0x720 kernel/fork.c:2681 The buggy address belongs to the physical page: page:ffffea0000a3edc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x28fb7 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 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 11, tgid 11 (kworker/u4:1), ts 8088437124, free_ts 6714803854 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 user_mode_thread+0x9b/0xd0 kernel/fork.c:2757 call_usermodehelper_exec_work kernel/umh.c:175 [inline] call_usermodehelper_exec_work+0xa4/0x140 kernel/umh.c:161 process_one_work+0x8ba/0x14b0 kernel/workqueue.c:2289 worker_thread+0x598/0xec0 kernel/workqueue.c:2436 kthread+0x294/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 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+0x19/0x480 mm/page_alloc.c:3464 __vunmap+0x66e/0xb40 mm/vmalloc.c:2727 free_work+0x4b/0x70 mm/vmalloc.c:100 process_one_work+0x8ba/0x14b0 kernel/workqueue.c:2289 worker_thread+0x598/0xec0 kernel/workqueue.c:2436 kthread+0x294/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffffc90004d17c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90004d17c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90004d17d00: f1 f1 f1 f1 00 f2 f2 f2 00 00 f2 f2 00 00 00 00 ^ ffffc90004d17d80: 00 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 ffffc90004d17e00: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================