blk_update_request: I/O error, dev loop51, sector 8 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 lbmIODone: I/O error in JFS log ================================================================== BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock+0x4f5/0x8e0 kernel/locking/spinlock_debug.c:112 Read of size 4 at addr ffff88801df71b54 by task kworker/0:1H/2150 CPU: 0 PID: 2150 Comm: kworker/0:1H Tainted: G W 5.13.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: kblockd blk_mq_run_work_fn Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack_lvl+0x1ae/0x29f lib/dump_stack.c:96 print_address_description+0x66/0x3b0 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report+0x163/0x210 mm/kasan/report.c:436 debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x4f5/0x8e0 kernel/locking/spinlock_debug.c:112 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline] _raw_spin_lock_irqsave+0xbf/0x100 kernel/locking/spinlock.c:159 __wake_up_common_lock kernel/sched/wait.c:137 [inline] __wake_up+0x128/0x210 kernel/sched/wait.c:157 req_bio_endio block/blk-core.c:265 [inline] blk_update_request+0x7f7/0x14f0 block/blk-core.c:1440 blk_mq_end_request block/blk-mq.c:565 [inline] blk_mq_dispatch_rq_list+0xd77/0x28f0 block/blk-mq.c:1399 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:201 [inline] blk_mq_do_dispatch_sched+0x6d9/0xc50 block/blk-mq-sched.c:214 __blk_mq_sched_dispatch_requests+0x38e/0x480 block/blk-mq-sched.c:329 blk_mq_sched_dispatch_requests+0xec/0x160 block/blk-mq-sched.c:360 __blk_mq_run_hw_queue+0xfb/0x170 block/blk-mq.c:1500 process_one_work+0x833/0x10c0 kernel/workqueue.c:2276 worker_thread+0xac1/0x1320 kernel/workqueue.c:2422 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 26242: 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+0xc4/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:263 [inline] kmem_cache_alloc_trace+0x96/0x340 mm/slub.c:2997 kmalloc include/linux/slab.h:591 [inline] lbmLogInit fs/jfs/jfs_logmgr.c:1829 [inline] lmLogInit+0x336/0x1ea0 fs/jfs/jfs_logmgr.c:1278 lmLogOpen+0x9c5/0x1190 fs/jfs/jfs_logmgr.c:1124 jfs_mount_rw+0xe7/0x710 fs/jfs/jfs_mount.c:260 jfs_fill_super+0x64c/0xc20 fs/jfs/super.c:570 mount_bdev+0x26c/0x3a0 fs/super.c:1368 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x86/0x270 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x196f/0x2be0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount+0x2f9/0x3b0 fs/namespace.c:3433 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+0x44/0xae Freed by task 26242: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0x109/0x150 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:229 [inline] slab_free_hook mm/slub.c:1639 [inline] slab_free_freelist_hook+0x1d8/0x290 mm/slub.c:1664 slab_free mm/slub.c:3224 [inline] kfree+0xcf/0x2d0 mm/slub.c:4268 lbmLogShutdown fs/jfs/jfs_logmgr.c:1872 [inline] lmLogInit+0x1425/0x1ea0 fs/jfs/jfs_logmgr.c:1423 lmLogOpen+0x9c5/0x1190 fs/jfs/jfs_logmgr.c:1124 jfs_mount_rw+0xe7/0x710 fs/jfs/jfs_mount.c:260 jfs_fill_super+0x64c/0xc20 fs/jfs/super.c:570 mount_bdev+0x26c/0x3a0 fs/super.c:1368 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x86/0x270 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x196f/0x2be0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount+0x2f9/0x3b0 fs/namespace.c:3433 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+0x44/0xae Last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:348 insert_work+0x54/0x400 kernel/workqueue.c:1332 __queue_work+0x90e/0xc40 kernel/workqueue.c:1498 queue_work_on+0x111/0x200 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x283/0x470 kernel/umh.c:435 kobject_uevent_env+0x1337/0x1700 lib/kobject_uevent.c:618 kobject_synth_uevent+0x3bf/0x900 lib/kobject_uevent.c:208 uevent_store+0x20/0x60 drivers/base/core.c:2370 kernfs_fop_write_iter+0x3b6/0x510 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xa39/0xc90 fs/read_write.c:605 ksys_write+0x171/0x2a0 fs/read_write.c:658 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+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:348 insert_work+0x54/0x400 kernel/workqueue.c:1332 __queue_work+0x90e/0xc40 kernel/workqueue.c:1498 queue_work_on+0x111/0x200 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x283/0x470 kernel/umh.c:435 kobject_uevent_env+0x1337/0x1700 lib/kobject_uevent.c:618 kobject_synth_uevent+0x3bf/0x900 lib/kobject_uevent.c:208 uevent_store+0x20/0x60 drivers/base/core.c:2370 kernfs_fop_write_iter+0x3b6/0x510 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xa39/0xc90 fs/read_write.c:605 ksys_write+0x171/0x2a0 fs/read_write.c:658 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+0x44/0xae The buggy address belongs to the object at ffff88801df71b00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 84 bytes inside of 192-byte region [ffff88801df71b00, ffff88801df71bc0) The buggy address belongs to the page: page:ffffea000077dc40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1df71 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888011841a00 raw: 0000000000000000 0000000080100010 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 7643743806, free_ts 7623915943 prep_new_page mm/page_alloc.c:2445 [inline] get_page_from_freelist+0x779/0xa30 mm/page_alloc.c:4178 __alloc_pages+0x26c/0x5f0 mm/page_alloc.c:5386 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2147 alloc_slab_page mm/slub.c:1702 [inline] allocate_slab+0xf1/0x540 mm/slub.c:1842 new_slab mm/slub.c:1905 [inline] new_slab_objects mm/slub.c:2651 [inline] ___slab_alloc+0x1cf/0x350 mm/slub.c:2814 __slab_alloc mm/slub.c:2854 [inline] slab_alloc_node mm/slub.c:2936 [inline] slab_alloc mm/slub.c:2978 [inline] kmem_cache_alloc_trace+0x29d/0x340 mm/slub.c:2995 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] call_usermodehelper_setup+0x8a/0x260 kernel/umh.c:365 kobject_uevent_env+0x1311/0x1700 lib/kobject_uevent.c:614 device_add+0x1020/0x1670 drivers/base/core.c:3305 netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:1955 register_netdevice+0x12a1/0x1c20 net/core/dev.c:10315 ifb_init_one+0x70/0xad drivers/net/ifb.c:313 ifb_init_module+0xab/0xff drivers/net/ifb.c:335 do_one_initcall+0x1a7/0x400 init/main.c:1246 do_initcall_level+0x14a/0x1f5 init/main.c:1319 do_initcalls+0x4b/0x8c init/main.c:1335 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1355 [inline] free_pcp_prepare+0xc29/0xd20 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3341 [inline] free_unref_page+0x7e/0x550 mm/page_alloc.c:3420 __vunmap+0x926/0xa70 mm/vmalloc.c:2569 free_work+0x66/0x90 mm/vmalloc.c:80 process_one_work+0x833/0x10c0 kernel/workqueue.c:2276 worker_thread+0xac1/0x1320 kernel/workqueue.c:2422 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88801df71a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801df71a80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88801df71b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801df71b80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88801df71c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================