================================================================== BUG: KASAN: use-after-free in jfs_lazycommit+0x7d4/0xc30 fs/jfs/jfs_txnmgr.c:2764 Read of size 4 at addr ffff888019ad4894 by task jfsCommit/276 CPU: 1 PID: 276 Comm: jfsCommit Not tainted 5.15.114-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 jfs_lazycommit+0x7d4/0xc30 fs/jfs/jfs_txnmgr.c:2764 kthread+0x3f6/0x4f0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 3870: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] jfs_fill_super+0xfb/0xc70 fs/jfs/super.c:500 mount_bdev+0x2c9/0x3f0 fs/super.c:1378 legacy_get_tree+0xeb/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1508 do_new_mount+0x28b/0xae0 fs/namespace.c:2994 do_mount fs/namespace.c:3337 [inline] __do_sys_mount fs/namespace.c:3545 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3522 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 3534: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0xf1/0x270 mm/slub.c:4559 generic_shutdown_super+0x136/0x2c0 fs/super.c:475 kill_block_super+0x7a/0xe0 fs/super.c:1405 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888019ad4800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of 256-byte region [ffff888019ad4800, ffff888019ad4900) The buggy address belongs to the page: page:ffffea000066b500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x19ad4 head:ffffea000066b500 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00004a7900 0000000300000003 ffff888011c41b40 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 6006515982, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_slab_page mm/slub.c:1777 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xb1/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] kmem_cache_alloc_node_trace+0x1ce/0x2e0 mm/slub.c:3270 kmalloc_node include/linux/slab.h:609 [inline] kzalloc_node include/linux/slab.h:732 [inline] blk_mq_init_tags+0x72/0x380 block/blk-mq-tag.c:552 blk_mq_alloc_rq_map+0x7a/0x190 block/blk-mq.c:2409 __blk_mq_alloc_map_and_request+0x94/0x310 block/blk-mq.c:2866 __blk_mq_alloc_rq_maps block/blk-mq.c:3356 [inline] blk_mq_alloc_map_and_requests+0xbe/0x4f0 block/blk-mq.c:3382 blk_mq_alloc_tag_set+0x797/0xfc0 block/blk-mq.c:3541 scsi_add_host_with_dma+0x15a/0x990 drivers/scsi/hosts.c:232 scsi_add_host include/scsi/scsi_host.h:773 [inline] virtscsi_probe+0x817/0xe70 drivers/scsi/virtio_scsi.c:906 virtio_dev_probe+0x815/0xa50 drivers/virtio/virtio.c:273 really_probe+0x24e/0xb60 drivers/base/dd.c:595 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755 driver_probe_device+0x50/0x420 drivers/base/dd.c:785 page_owner free stack trace missing Memory state around the buggy address: ffff888019ad4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888019ad4800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888019ad4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888019ad4900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888019ad4980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================