BUG: spinlock bad magic on CPU#0, jfsCommit/103 ================================================================== BUG: KASAN: slab-out-of-bounds in string_nocheck lib/vsprintf.c:646 [inline] BUG: KASAN: slab-out-of-bounds in string+0x218/0x2b0 lib/vsprintf.c:728 Read of size 1 at addr ffff888012dac9f0 by task jfsCommit/103 CPU: 0 UID: 0 PID: 103 Comm: jfsCommit Not tainted 6.11.0-syzkaller-05442-g932d2d1fcb2b #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 string_nocheck lib/vsprintf.c:646 [inline] string+0x218/0x2b0 lib/vsprintf.c:728 vsnprintf+0x1101/0x1da0 lib/vsprintf.c:2824 vprintk_store+0x480/0x1160 kernel/printk/printk.c:2260 vprintk_emit+0x271/0xa10 kernel/printk/printk.c:2383 _printk+0xd5/0x120 kernel/printk/printk.c:2432 spin_dump kernel/locking/spinlock_debug.c:64 [inline] spin_bug+0x13b/0x1d0 kernel/locking/spinlock_debug.c:78 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x209/0x370 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162 __wake_up_common_lock+0x25/0x1e0 kernel/sched/wait.c:105 unlock_metapage fs/jfs/jfs_metapage.c:39 [inline] release_metapage+0xb2/0x960 fs/jfs/jfs_metapage.c:763 xtTruncate+0x1006/0x3270 jfs_free_zero_link+0x46e/0x6e0 fs/jfs/namei.c:759 jfs_evict_inode+0x35f/0x440 fs/jfs/inode.c:153 evict+0x4e8/0x9b0 fs/inode.c:731 txUpdateMap+0x931/0xb10 fs/jfs/jfs_txnmgr.c:2367 txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline] jfs_lazycommit+0x49a/0xb80 fs/jfs/jfs_txnmgr.c:2733 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888012dac9c0 which belongs to the cache jfs_ip of size 2232 The buggy address is located 48 bytes inside of allocated 2232-byte region [ffff888012dac9c0, ffff888012dad278) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12da8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000040 ffff8880330dd000 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800d000d 00000001fdffffff 0000000000000000 head: 00fff00000000040 ffff8880330dd000 dead000000000122 0000000000000000 head: 0000000000000000 00000000800d000d 00000001fdffffff 0000000000000000 head: 00fff00000000003 ffffea00004b6a01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 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_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 5088, tgid 5088 (syz-executor333), ts 74309347302, free_ts 73265918165 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4702 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263 alloc_slab_page+0x6a/0x130 mm/slub.c:2413 allocate_slab+0x5a/0x2f0 mm/slub.c:2579 new_slab mm/slub.c:2632 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3819 __slab_alloc+0x58/0xa0 mm/slub.c:3909 __slab_alloc_node mm/slub.c:3962 [inline] slab_alloc_node mm/slub.c:4123 [inline] kmem_cache_alloc_lru_noprof+0x1c5/0x2b0 mm/slub.c:4154 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode fs/inode.c:263 [inline] new_inode_pseudo fs/inode.c:1110 [inline] new_inode+0x6e/0x310 fs/inode.c:1129 jfs_fill_super+0x408/0xc50 fs/jfs/super.c:544 mount_bdev+0x20a/0x2d0 fs/super.c:1679 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 page last free pid 5082 tgid 5082 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2619 __slab_free+0x31b/0x3d0 mm/slub.c:4491 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4086 [inline] slab_alloc_node mm/slub.c:4135 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4142 ptlock_alloc+0x20/0x70 mm/memory.c:6606 ptlock_init include/linux/mm.h:2951 [inline] pagetable_pte_ctor include/linux/mm.h:2978 [inline] __pte_alloc_one_noprof include/asm-generic/pgalloc.h:73 [inline] pte_alloc_one+0xcd/0x5d0 arch/x86/mm/pgtable.c:33 __pte_alloc+0x79/0x3a0 mm/memory.c:448 do_anonymous_page mm/memory.c:4540 [inline] do_pte_missing mm/memory.c:3962 [inline] handle_pte_fault+0x55cd/0x6fc0 mm/memory.c:5538 __handle_mm_fault mm/memory.c:5681 [inline] handle_mm_fault+0x1106/0x1bb0 mm/memory.c:5849 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 Memory state around the buggy address: ffff888012dac880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888012dac900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff888012dac980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888012daca00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888012daca80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================