From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8276D26C3B0 for ; Wed, 7 Jan 2026 07:00:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767769206; cv=none; b=iG39UCfJCT+7muD9KWjA5wk1IIrZPPt332tsYqjG3SdH8EkySCB19yKq/2/FTcrxUfBCgeWcnc3Cjc8NIkcWXTLiJv/Hqxj3uU42ZSqpBEJbbIU32YMnGwQhQ65A9NrlYIgzNbmKQycDC7oWQ8lQqzKWJk7p3BaB5GZ6OK0evQM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767769206; c=relaxed/simple; bh=0v469wpLeLx1DztR0zLKz9QbU9cShiT+64BVpGb28wE=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=r5NYNNvwHjMoiaPqJ4TOH6BlAECaZVR3nud02rKD87xKaubTh+2zG0+No8QmzUrP80bpAhQIyj0jFJmRiEk7+FjNl/+9jeO+2b9CyDpZ8iNPQdueIvvFvvBqr25dpO4Sl8QASBoSiyfhRAhCgo9ARD+giUqijlA86dndqWTUGho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.210.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-ot1-f70.google.com with SMTP id 46e09a7af769-7c70546acd9so5089806a34.3 for ; Tue, 06 Jan 2026 23:00:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767769203; x=1768374003; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GD0kwlermfPtAb7YM8SUYbX43AHgqAX/iotxupLv/78=; b=HNCn6Shjp8zxjmB+QPEq9DdP3NCMmVcQwfj8mSIdhjmyfQxpFGbeoBEcLJQ2TmwPPE bnE1oK59TRUdaqYME+SN8e/34tanjLBikDNyrEjgJhfF7cxiLEn1g4DxpRjkXy3amzRI OSpuSbqVNruEwvi96dxqB1jYEdGjtToz9ddq8iOlMZkj3TN58zYnSb90TOKehaC05pcm c99F+yTkQwXQSQr8e3U53H0DauZfsFRoK4PHdunPTlR6XeEYoQWuvJVRnt0EiQF6Dabc uU1Vad8ikoDnQcFDqQXuCvVQtAYSRpIXJRubLsfv62KNNXBWStpLtix/9RLl8UqJu3Ji v25w== X-Forwarded-Encrypted: i=1; AJvYcCWEh+wxBBvKi3HMIu/+v7hU5Yc96J/ATDrn7+nAT88inFRYx0DAulLu690wFXaw8+s9mbzD7LrZnRuNKUw=@vger.kernel.org X-Gm-Message-State: AOJu0YwaOLq2GTd8Rt6YsKTXOoy7Ut2V1tC6KA/rg3BrLXDx67RaR2d2 yKiw2CBMv2o1+P5KFsmExxfpDAPQTs5VsoE+0n7UI3x5SifQ/+xTF5gwCLnH4cE8eKGPMLetz7s fsfOWkWJQ0XUCizds3Jd8qD6Q7I69BP4DQUpKKM2WMmDTkVkdBeHaNJeU1MA= X-Google-Smtp-Source: AGHT+IG++CWCVhrnE3v4bXZW9zJHokoe0UFt7cLEGAjZO/2s2hWr8J6uMbyWbwtyrGa/fhNsVbEWZwmHw7Wq8JIEloPVNtPS+8vY Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:2283:b0:65c:fe5b:9f5c with SMTP id 006d021491bc7-65f54f74c22mr620675eaf.56.1767769203397; Tue, 06 Jan 2026 23:00:03 -0800 (PST) Date: Tue, 06 Jan 2026 23:00:03 -0800 In-Reply-To: <8b7dffa7-08b4-4705-8c6e-e73f6784dc43@kernel.org> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <695e0473.050a0220.1c677c.0356.GAE@google.com> Subject: Re: [syzbot] [f2fs?] KASAN: use-after-free Read in f2fs_write_end_io (2) From: syzbot To: chao@kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot has tested the proposed patch but the reproducer is still triggering an issue: KASAN: slab-use-after-free Read in f2fs_write_end_io ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] BUG: KASAN: slab-use-after-free in get_pages fs/f2fs/f2fs.h:2718 [inline] BUG: KASAN: slab-use-after-free in f2fs_write_end_io+0x9b9/0xb60 fs/f2fs/data.c:364 Read of size 4 at addr ffff888012609170 by task kworker/u4:12/1826 CPU: 0 UID: 0 PID: 1826 Comm: kworker/u4:12 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: loop0 loop_workfn Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:200 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] get_pages fs/f2fs/f2fs.h:2718 [inline] f2fs_write_end_io+0x9b9/0xb60 fs/f2fs/data.c:364 blk_update_request+0x57e/0xe60 block/blk-mq.c:1007 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1169 lo_rw_aio_complete drivers/block/loop.c:337 [inline] lo_rw_aio+0xcd1/0xef0 drivers/block/loop.c:410 do_req_filebacked drivers/block/loop.c:-1 [inline] loop_handle_cmd drivers/block/loop.c:1926 [inline] loop_process_work+0x8fe/0x10b0 drivers/block/loop.c:1961 process_one_work kernel/workqueue.c:3257 [inline] process_scheduled_works+0xad1/0x1770 kernel/workqueue.c:3340 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3421 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x510/0xa50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Allocated by task 5909: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x3e2/0x700 mm/slub.c:5776 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] f2fs_fill_super+0x8c/0x6ec0 fs/f2fs/super.c:4895 get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1691 vfs_get_tree+0x92/0x2a0 fs/super.c:1751 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount+0x302/0xa10 fs/namespace.c:3712 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4201 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5909: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6670 [inline] kfree+0x1c0/0x660 mm/slub.c:6878 kill_f2fs_super+0x5bb/0x6c0 fs/f2fs/super.c:5460 deactivate_locked_super+0xbc/0x130 fs/super.c:474 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1318 task_work_run+0x1d4/0x260 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x694/0x22f0 kernel/exit.c:971 do_group_exit+0x21c/0x2d0 kernel/exit.c:1112 get_signal+0x1285/0x1340 kernel/signal.c:3034 arch_do_signal_or_restart+0x9a/0x7a0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline] exit_to_user_mode_loop+0x87/0x4e0 kernel/entry/common.c:75 __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_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x2c1/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 insert_work+0x3d/0x330 kernel/workqueue.c:2180 __queue_work+0xcd0/0xf90 kernel/workqueue.c:2335 queue_work_on+0x106/0x1c0 kernel/workqueue.c:2386 queue_work include/linux/workqueue.h:669 [inline] schedule_work include/linux/workqueue.h:730 [inline] f2fs_handle_critical_error+0x255/0x540 fs/f2fs/super.c:4624 f2fs_write_end_io+0x886/0xb60 fs/f2fs/data.c:351 __submit_merged_bio+0x256/0x660 fs/f2fs/data.c:540 __f2fs_submit_merged_write fs/f2fs/data.c:635 [inline] __submit_merged_write_cond+0x471/0x530 fs/f2fs/data.c:657 f2fs_sync_node_pages+0x1479/0x15e0 fs/f2fs/node.c:2166 block_operations fs/f2fs/checkpoint.c:1276 [inline] f2fs_write_checkpoint+0xdd5/0x2430 fs/f2fs/checkpoint.c:1678 kill_f2fs_super+0x2d2/0x6c0 fs/f2fs/super.c:5448 deactivate_locked_super+0xbc/0x130 fs/super.c:474 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1318 task_work_run+0x1d4/0x260 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x694/0x22f0 kernel/exit.c:971 do_group_exit+0x21c/0x2d0 kernel/exit.c:1112 get_signal+0x1285/0x1340 kernel/signal.c:3034 arch_do_signal_or_restart+0x9a/0x7a0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline] exit_to_user_mode_loop+0x87/0x4e0 kernel/entry/common.c:75 __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_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x2c1/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 insert_work+0x3d/0x330 kernel/workqueue.c:2180 __queue_work+0xcd0/0xf90 kernel/workqueue.c:2335 queue_work_on+0x106/0x1c0 kernel/workqueue.c:2386 sanity_check_node_footer fs/f2fs/node.c:1536 [inline] __get_node_folio+0xcaf/0x14f0 fs/f2fs/node.c:1581 do_read_inode fs/f2fs/inode.c:425 [inline] f2fs_iget+0x77c/0x5640 fs/f2fs/inode.c:596 f2fs_nfs_get_inode+0x76/0x110 fs/f2fs/super.c:3723 generic_fh_to_dentry+0x9f/0xf0 fs/libfs.c:1498 exportfs_decode_fh_raw+0x178/0x6e0 fs/exportfs/expfs.c:456 do_handle_to_path+0xa4/0x1a0 fs/fhandle.c:276 handle_to_path fs/fhandle.c:400 [inline] do_handle_open+0x6a1/0x930 fs/fhandle.c:424 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888012608000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4464 bytes inside of freed 8192-byte region [ffff888012608000, ffff88801260a000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12608 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801a442280 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801a442280 0000000000000000 dead000000000001 head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0000498201 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x528c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NORETRY|__GFP_COMP), pid 5641, tgid 5641 (syz-executor), ts 138685806163, free_ts 108015343563 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1857 prep_new_page mm/page_alloc.c:1865 [inline] get_page_from_freelist+0x24e0/0x2580 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xe53/0x1820 mm/slub.c:4656 __slab_alloc+0x65/0x100 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] __do_kmalloc_node mm/slub.c:5656 [inline] __kvmalloc_node_noprof+0x6b6/0x920 mm/slub.c:7136 kvmalloc_array_node_noprof include/linux/slab.h:1122 [inline] __ptr_ring_init_queue_alloc_noprof include/linux/ptr_ring.h:481 [inline] ptr_ring_init_noprof include/linux/ptr_ring.h:499 [inline] skb_array_init_noprof include/linux/skb_array.h:182 [inline] pfifo_fast_init+0x112/0x6c0 net/sched/sch_generic.c:870 qdisc_create_dflt+0x13b/0x4c0 net/sched/sch_generic.c:1015 mq_init+0x2dc/0x660 net/sched/sch_mq.c:90 qdisc_create_dflt+0x13b/0x4c0 net/sched/sch_generic.c:1015 attach_default_qdiscs net/sched/sch_generic.c:1197 [inline] dev_activate+0x1ce/0x1150 net/sched/sch_generic.c:1251 __dev_open+0x647/0x800 net/core/dev.c:1692 __dev_change_flags+0x1f7/0x680 net/core/dev.c:9736 netif_change_flags+0x88/0x1a0 net/core/dev.c:9799 page last free pid 43 tgid 43 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_pages_ok+0xa83/0xbe0 mm/page_alloc.c:1582 wg_destruct+0x25f/0x310 drivers/net/wireguard/device.c:264 netdev_run_todo+0xcd5/0xea0 net/core/dev.c:11693 default_device_exit_batch+0x969/0x9e0 net/core/dev.c:13039 ops_exit_list net/core/net_namespace.c:205 [inline] ops_undo_list+0x525/0x990 net/core/net_namespace.c:252 cleanup_net+0x4d8/0x7a0 net/core/net_namespace.c:696 process_one_work kernel/workqueue.c:3257 [inline] process_scheduled_works+0xad1/0x1770 kernel/workqueue.c:3340 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3421 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x510/0xa50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff888012609000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888012609080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888012609100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888012609180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888012609200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Tested on: commit: ef6e5789 f2fs: fix use-after-free in f2fs_write_end_io git tree: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git bugfix/syzbot console output: https://syzkaller.appspot.com/x/log.txt?x=117fc922580000 kernel config: https://syzkaller.appspot.com/x/.config?x=513255d80ab78f2b dashboard link: https://syzkaller.appspot.com/bug?extid=b4444e3c972a7a124187 compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 Note: no patches were applied.