BUG: spinlock bad magic on CPU#0, jfsCommit/103 ================================================================== BUG: KASAN: slab-out-of-bounds in string_nocheck lib/vsprintf.c:654 [inline] BUG: KASAN: slab-out-of-bounds in string+0x231/0x2b0 lib/vsprintf.c:736 Read of size 1 at addr ffff888044bb52f8 by task jfsCommit/103 CPU: 0 UID: 0 PID: 103 Comm: jfsCommit 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 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 string_nocheck lib/vsprintf.c:654 [inline] string+0x231/0x2b0 lib/vsprintf.c:736 vsnprintf+0x739/0xee0 lib/vsprintf.c:2947 vprintk_store+0x371/0xd50 kernel/printk/printk.c:2255 vprintk_emit+0x192/0x560 kernel/printk/printk.c:2402 _printk+0xdd/0x130 kernel/printk/printk.c:2451 spin_dump+0x101/0x1a0 kernel/locking/spinlock_debug.c:64 spin_bug kernel/locking/spinlock_debug.c:78 [inline] debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x1e5/0x2f0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x4c/0x60 kernel/locking/spinlock.c:162 __wake_up_common_lock+0x2f/0x1f0 kernel/sched/wait.c:124 unlock_metapage fs/jfs/jfs_metapage.c:40 [inline] release_metapage+0x13c/0xac0 fs/jfs/jfs_metapage.c:871 xtTruncate+0xecd/0x2f20 fs/jfs/jfs_xtree.c:-1 jfs_free_zero_link+0x35b/0x4c0 fs/jfs/namei.c:759 jfs_evict_inode+0x363/0x440 fs/jfs/inode.c:159 evict+0x61e/0xb10 fs/inode.c:837 txLazyCommit fs/jfs/jfs_txnmgr.c:2665 [inline] jfs_lazycommit+0x43d/0xaa0 fs/jfs/jfs_txnmgr.c:2734 kthread+0x726/0x8b0 kernel/kthread.c:463 ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 The buggy address belongs to the object at ffff888044bb5268 which belongs to the cache jfs_ip of size 2216 The buggy address is located 144 bytes inside of allocated 2216-byte region [ffff888044bb5268, ffff888044bb5b10) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x44bb0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88803feccd01 flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff888000179c80 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800d000d 00000000f5000000 ffff88803feccd01 head: 04fff00000000040 ffff888000179c80 dead000000000122 0000000000000000 head: 0000000000000000 00000000800d000d 00000000f5000000 ffff88803feccd01 head: 04fff00000000003 ffffea000112ec01 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 Reclaimable, gfp_mask 0xd2050(__GFP_RECLAIMABLE|__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5497, tgid 5497 (syz.0.17), ts 108782347780, free_ts 97667862248 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5240 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3a0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xd82/0x1760 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] kmem_cache_alloc_lru_noprof+0x3ed/0x6c0 mm/slub.c:5282 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode+0x6a/0x1b0 fs/inode.c:346 new_inode+0x22/0x170 fs/inode.c:1175 jfs_fill_super+0x569/0xd80 fs/jfs/super.c:511 get_tree_bdev_flags+0x431/0x4f0 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+0x329/0xa50 fs/namespace.c:3712 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4201 page last free pid 73 tgid 73 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xbf8/0xd70 mm/page_alloc.c:2973 __slab_free+0x2ce/0x320 mm/slub.c:6008 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x427/0x6f0 mm/slub.c:5315 zswap_entry_cache_alloc mm/zswap.c:702 [inline] zswap_store_page mm/zswap.c:1422 [inline] zswap_store+0xb68/0x1f80 mm/zswap.c:1539 swap_writeout+0x70c/0xd70 mm/page_io.c:275 writeout mm/vmscan.c:651 [inline] pageout mm/vmscan.c:698 [inline] shrink_folio_list+0x332f/0x5160 mm/vmscan.c:1418 evict_folios+0x4795/0x5880 mm/vmscan.c:4711 try_to_shrink_lruvec+0x88b/0xb20 mm/vmscan.c:4874 shrink_one+0x25c/0x710 mm/vmscan.c:4919 shrink_many mm/vmscan.c:4982 [inline] lru_gen_shrink_node mm/vmscan.c:5060 [inline] shrink_node+0x2f8b/0x35f0 mm/vmscan.c:6047 kswapd_shrink_node mm/vmscan.c:6901 [inline] balance_pgdat mm/vmscan.c:7084 [inline] kswapd+0x144c/0x2800 mm/vmscan.c:7354 kthread+0x726/0x8b0 kernel/kthread.c:463 ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158 Memory state around the buggy address: ffff888044bb5180: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff888044bb5200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888044bb5280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888044bb5300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888044bb5380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================