ci2 starts bisection 2024-12-05 08:49:35.285876038 +0000 UTC m=+113.768551124 bisecting fixing commit since c61bd26ae81a896c8660150b4e356153da30880a building syzkaller on 3113787fe7a0c96998737e520aa95c303fdd41ef ensuring issue is reproducible on original commit c61bd26ae81a896c8660150b4e356153da30880a testing commit c61bd26ae81a896c8660150b4e356153da30880a gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 6a2a5b324429d38a599a273497482c0473639e26eaf8e464491581cc40071a84 run #0: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #1: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #2: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #3: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #4: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #5: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #6: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #7: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #8: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #9: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #10: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #11: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #12: crashed: KASAN: out-of-bounds Read in __ext4_check_dir_entry run #13: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #14: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #15: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #16: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #17: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #18: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry run #19: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry representative crash: KASAN: use-after-free Read in __ext4_check_dir_entry, types: [KASAN] check whether we can drop unnecessary instrumentation disabling configs for [LOCKDEP ATOMIC_SLEEP HANG LEAK UBSAN BUG], they are not needed testing commit c61bd26ae81a896c8660150b4e356153da30880a gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 0f55987e793b4909b497906a01dd5ceb036e03c01bb8e7df2a1e43d8c3a50f1d all runs: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry representative crash: KASAN: use-after-free Read in __ext4_check_dir_entry, types: [KASAN] the bug reproduces without the instrumentation disabling configs for [ATOMIC_SLEEP HANG LEAK UBSAN BUG LOCKDEP], they are not needed kconfig minimization: base=3706 full=7269 leaves diff=1976 split chunks (needed=false): <1976> split chunk #0 of len 1976 into 5 parts testing without sub-chunk 1/5 disabling configs for [ATOMIC_SLEEP HANG LEAK UBSAN BUG LOCKDEP], they are not needed testing commit c61bd26ae81a896c8660150b4e356153da30880a gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 411735744a4a4cd8eff99d589ea084f5864f691891746e441664e485ec1aca33 all runs: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry representative crash: KASAN: use-after-free Read in __ext4_check_dir_entry, types: [KASAN] the chunk can be dropped testing without sub-chunk 2/5 disabling configs for [LOCKDEP ATOMIC_SLEEP HANG LEAK UBSAN BUG], they are not needed testing commit c61bd26ae81a896c8660150b4e356153da30880a gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: d6b3a5d1e185549873c5bbfd6de50ae11bc40bda5b11ac1396c541ea5ade7d35 all runs: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry representative crash: KASAN: use-after-free Read in __ext4_check_dir_entry, types: [KASAN] the chunk can be dropped testing without sub-chunk 3/5 disabling configs for [BUG LOCKDEP ATOMIC_SLEEP HANG LEAK UBSAN], they are not needed testing commit c61bd26ae81a896c8660150b4e356153da30880a gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 49584add1f871c80ef412a0a049cf93c824d52d8d1f7833aaa666e929220d07d all runs: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry representative crash: KASAN: use-after-free Read in __ext4_check_dir_entry, types: [KASAN] the chunk can be dropped testing without sub-chunk 4/5 disabling configs for [BUG LOCKDEP ATOMIC_SLEEP HANG LEAK UBSAN], they are not needed testing commit c61bd26ae81a896c8660150b4e356153da30880a gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: eec1b9bee378a039874ea07f4e7f52b3b8d1a3e2874bbff350053395ca494918 all runs: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry representative crash: KASAN: use-after-free Read in __ext4_check_dir_entry, types: [KASAN] the chunk can be dropped testing without sub-chunk 5/5 disabling configs for [HANG LEAK UBSAN BUG LOCKDEP ATOMIC_SLEEP], they are not needed testing commit c61bd26ae81a896c8660150b4e356153da30880a gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 9bd460fce464419ef510f90aff9ac50d3535c91daa12aa31895a826a4a09d52b all runs: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry representative crash: KASAN: use-after-free Read in __ext4_check_dir_entry, types: [KASAN] the chunk can be dropped disabling configs for [UBSAN BUG LOCKDEP ATOMIC_SLEEP HANG LEAK], they are not needed testing current HEAD 0a51d2d4527b43c5e467ffa6897deefeaf499358 testing commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 515bd9c32822fffe759ed782c7111afdfcecd06ec4da0b007ece7a580719fa7a all runs: crashed: KASAN: use-after-free Read in __ext4_check_dir_entry representative crash: KASAN: use-after-free Read in __ext4_check_dir_entry, types: [KASAN] crash still not fixed/happens on the oldest tested release revisions tested: 8, total time: 3h35m56.099286162s (build: 2h0m5.737921945s, test: 39m7.904103464s) crash still not fixed or there were kernel test errors commit msg: Linux 5.15.173 crash: KASAN: use-after-free Read in __ext4_check_dir_entry EXT4-fs warning (device loop4): dx_probe:965: inode #2: comm syz-executor.4: Corrupt directory, running e2fsck is recommended ================================================================== BUG: KASAN: use-after-free in __ext4_check_dir_entry+0x5ee/0x920 fs/ext4/dir.c:85 Read of size 2 at addr ffff888118ae0003 by task syz-executor.4/4289 CPU: 0 PID: 4289 Comm: syz-executor.4 Not tainted 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x41/0x5e lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:451 __ext4_check_dir_entry+0x5ee/0x920 fs/ext4/dir.c:85 ext4_readdir+0xd2c/0x2780 fs/ext4/dir.c:258 iterate_dir+0x48a/0x6d0 fs/readdir.c:65 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __x64_sys_getdents64+0x122/0x220 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f6fc65d7ee9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6fc615a0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f6fc670efa0 RCX: 00007f6fc65d7ee9 RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007f6fc662447f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f6fc670efa0 R15: 00007ffda6dcae28 Allocated by task 3905: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x61/0x80 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x211/0x310 mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:711 [inline] __alloc_file+0x20/0x240 fs/file_table.c:101 alloc_empty_file+0x3c/0xf0 fs/file_table.c:150 path_openat+0xdd/0x2360 fs/namei.c:3728 do_filp_open+0x199/0x3d0 fs/namei.c:3769 do_sys_openat2+0x11e/0x400 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 17: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xe0/0x110 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook mm/slub.c:1731 [inline] slab_free mm/slub.c:3499 [inline] kmem_cache_free+0x7e/0x450 mm/slub.c:3515 rcu_do_batch kernel/rcu/tree.c:2523 [inline] rcu_core+0x58c/0x1190 kernel/rcu/tree.c:2763 handle_softirqs+0x14f/0x4f0 kernel/softirq.c:558 run_ksoftirqd kernel/softirq.c:925 [inline] run_ksoftirqd+0x1a/0x20 kernel/softirq.c:917 smpboot_thread_fn+0x2b9/0x650 kernel/smpboot.c:164 kthread+0x2f8/0x3b0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xc5/0xf0 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x98/0x6d0 kernel/rcu/tree.c:3087 task_work_run+0xb8/0x140 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:181 [inline] exit_to_user_mode_prepare+0x15d/0x160 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x12/0x30 kernel/entry/common.c:307 do_syscall_64+0x40/0x80 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xc5/0xf0 mm/kasan/generic.c:348 task_work_add+0x36/0x130 kernel/task_work.c:38 fput_many fs/file_table.c:336 [inline] fput_many+0xa5/0x120 fs/file_table.c:329 path_openat+0x1504/0x2360 fs/namei.c:3751 do_filp_open+0x199/0x3d0 fs/namei.c:3769 do_sys_openat2+0x11e/0x400 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888118ae0000 which belongs to the cache filp of size 464 The buggy address is located 3 bytes inside of 464-byte region [ffff888118ae0000, ffff888118ae01d0) The buggy address belongs to the page: page:ffffea000462b800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x118ae0 head:ffffea000462b800 order:1 compound_mapcount:0 memcg:ffff888112068181 flags: 0x200000000010200(slab|head|node=0|zone=2) raw: 0200000000010200 ffffea00043fe080 0000000600000006 ffff888100140780 raw: 0000000000000000 00000000000c000c 00000001ffffffff ffff888112068181 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3443, ts 70218845018, free_ts 70176692692 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1319/0x2e50 mm/page_alloc.c:4192 __alloc_pages+0x2b3/0x590 mm/page_alloc.c:5464 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab+0x2eb/0x430 mm/slub.c:1912 new_slab mm/slub.c:1975 [inline] ___slab_alloc+0xb1c/0xf80 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x2d7/0x310 mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:711 [inline] __alloc_file+0x20/0x240 fs/file_table.c:101 alloc_empty_file+0x3c/0xf0 fs/file_table.c:150 path_openat+0xdd/0x2360 fs/namei.c:3728 do_filp_open+0x199/0x3d0 fs/namei.c:3769 do_sys_openat2+0x11e/0x400 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare+0x34e/0x730 mm/page_alloc.c:1391 free_unref_page_prepare mm/page_alloc.c:3317 [inline] free_unref_page+0x19/0x3b0 mm/page_alloc.c:3396 qlink_free mm/kasan/quarantine.c:157 [inline] qlist_free_all+0x68/0x110 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x180/0x1f0 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x73/0x80 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x211/0x310 mm/slub.c:3233 getname_flags.part.0+0x4a/0x440 fs/namei.c:138 do_sys_openat2+0xd2/0x400 fs/open.c:1247 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888118adff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888118adff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888118ae0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888118ae0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888118ae0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================