netdevsim netdevsim5 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0 ================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:840 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xaea/0xcc0 fs/ext4/extents.c:956 Read of size 4 at addr ffff888054fcec94 by task kworker/u4:10/1096 CPU: 0 UID: 0 PID: 1096 Comm: kworker/u4:10 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 ext4_ext_binsearch fs/ext4/extents.c:840 [inline] ext4_find_extent+0xaea/0xcc0 fs/ext4/extents.c:956 ext4_ext_map_blocks+0x283/0x58b0 fs/ext4/extents.c:4261 ext4_map_create_blocks+0x11d/0x540 fs/ext4/inode.c:616 ext4_map_blocks+0x7cd/0x11d0 fs/ext4/inode.c:809 mpage_map_one_extent fs/ext4/inode.c:2373 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2467 [inline] ext4_do_writepages+0x22c0/0x46e0 fs/ext4/inode.c:2925 ext4_writepages+0x241/0x3b0 fs/ext4/inode.c:3019 do_writepages+0x32e/0x550 mm/page-writeback.c:2554 __writeback_single_inode+0x133/0x11a0 fs/fs-writeback.c:1750 writeback_sb_inodes+0x992/0x1a20 fs/fs-writeback.c:2042 wb_writeback+0x456/0xb70 fs/fs-writeback.c:2227 wb_do_writeback fs/fs-writeback.c:2374 [inline] wb_workfn+0x414/0xf50 fs/fs-writeback.c:2414 process_one_work kernel/workqueue.c:3275 [inline] process_scheduled_works+0xb02/0x1830 kernel/workqueue.c:3358 worker_thread+0xa50/0xfc0 kernel/workqueue.c:3439 kthread+0x388/0x470 kernel/kthread.c:467 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x215e pfn:0x54fce flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 000000000000215e 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), pid 5331, tgid 5331 (syz-executor), ts 97438231001, free_ts 100942204476 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_pages_slowpath+0x3b1/0xd40 mm/page_alloc.c:4805 __alloc_frozen_pages_noprof+0x322/0x380 mm/page_alloc.c:5263 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2484 alloc_frozen_pages_noprof mm/mempolicy.c:2555 [inline] alloc_pages_noprof+0xa8/0x190 mm/mempolicy.c:2575 vm_area_alloc_pages mm/vmalloc.c:3731 [inline] __vmalloc_area_node mm/vmalloc.c:3876 [inline] __vmalloc_node_range_noprof+0xc22/0x1730 mm/vmalloc.c:4064 vmalloc_user_noprof+0xad/0xe0 mm/vmalloc.c:4218 kcov_ioctl+0x55/0x620 kernel/kcov.c:726 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5351 tgid 5351 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978 vfree+0x25a/0x400 mm/vmalloc.c:3479 kcov_put kernel/kcov.c:442 [inline] kcov_close+0x28/0x50 kernel/kcov.c:543 __fput+0x44f/0xa70 fs/file_table.c:469 task_work_run+0x1d9/0x270 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x69b/0x2320 kernel/exit.c:971 do_group_exit+0x21b/0x2d0 kernel/exit.c:1112 get_signal+0x1284/0x1330 kernel/signal.c:3034 arch_do_signal_or_restart+0xbc/0x830 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888054fceb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888054fcec00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888054fcec80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888054fced00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888054fced80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================