__vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x274/0x600 fs/xattr.c:665 path_setxattrat+0x364/0x3a0 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7febe898e969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007febe9824038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007febe8bb5fa0 RCX: 00007febe898e969 RDX: 0000000000000000 RSI: 0000200000000080 RDI: 0000200000000040 RBP: 00007febe8a10ab1 R08: 0200000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007febe8bb5fa0 R15: 00007ffdd4f1c9c8 getblk(): invalid block size 4096 requested logical block size: 32768 CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.15.0-syzkaller-07774-g90b83efa6701 #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 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 __getblk_slow fs/buffer.c:1133 [inline] bdev_getblk+0x5b0/0x690 fs/buffer.c:1467 __bread_gfp+0x89/0x3c0 fs/buffer.c:1521 sb_bread include/linux/buffer_head.h:348 [inline] readSuper+0x1ac/0x270 fs/jfs/jfs_mount.c:466 updateSuper+0x1cf/0x5d0 fs/jfs/jfs_mount.c:423 jfs_handle_error fs/jfs/super.c:69 [inline] jfs_error+0x198/0x2c0 fs/jfs/super.c:98 release_metapage+0x60f/0xac0 fs/jfs/jfs_metapage.c:777 write_metapage fs/jfs/jfs_metapage.h:75 [inline] flush_metapage fs/jfs/jfs_metapage.h:81 [inline] ea_put fs/jfs/xattr.c:623 [inline] __jfs_setxattr+0xa6e/0x1120 fs/jfs/xattr.c:792 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x439/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x274/0x600 fs/xattr.c:665 path_setxattrat+0x364/0x3a0 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7febe898e969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007febe9824038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007febe8bb5fa0 RCX: 00007febe898e969 RDX: 0000000000000000 RSI: 0000200000000080 RDI: 0000200000000040 RBP: 00007febe8a10ab1 R08: 0200000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007febe8bb5fa0 R15: 00007ffdd4f1c9c8 ERROR: (device loop0): remounting filesystem as read-only ================================================================== BUG: KASAN: slab-use-after-free in drop_metapage fs/jfs/jfs_metapage.c:229 [inline] BUG: KASAN: slab-use-after-free in release_metapage+0x760/0xac0 fs/jfs/jfs_metapage.c:784 Read of size 8 at addr ffff88803f0d8310 by task syz.0.0/5319 CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.15.0-syzkaller-07774-g90b83efa6701 #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 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 drop_metapage fs/jfs/jfs_metapage.c:229 [inline] release_metapage+0x760/0xac0 fs/jfs/jfs_metapage.c:784 write_metapage fs/jfs/jfs_metapage.h:75 [inline] flush_metapage fs/jfs/jfs_metapage.h:81 [inline] ea_put fs/jfs/xattr.c:623 [inline] __jfs_setxattr+0xa6e/0x1120 fs/jfs/xattr.c:792 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x439/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x274/0x600 fs/xattr.c:665 path_setxattrat+0x364/0x3a0 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7febe898e969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007febe9824038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007febe8bb5fa0 RCX: 00007febe898e969 RDX: 0000000000000000 RSI: 0000200000000080 RDI: 0000200000000040 RBP: 00007febe8a10ab1 R08: 0200000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007febe8bb5fa0 R15: 00007ffdd4f1c9c8 Allocated by task 5319: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4203 mempool_alloc_noprof+0x1a4/0x510 mm/mempool.c:402 alloc_metapage fs/jfs/jfs_metapage.c:182 [inline] __get_metapage+0x509/0xde0 fs/jfs/jfs_metapage.c:652 ea_get+0xb8e/0x1330 fs/jfs/xattr.c:528 __jfs_setxattr+0x57c/0x1120 fs/jfs/xattr.c:727 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x439/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x274/0x600 fs/xattr.c:665 path_setxattrat+0x364/0x3a0 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5320: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2380 [inline] slab_free mm/slub.c:4642 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4744 free_metapage fs/jfs/jfs_metapage.c:197 [inline] drop_metapage fs/jfs/jfs_metapage.c:234 [inline] release_metapage+0x859/0xac0 fs/jfs/jfs_metapage.c:784 xtSearch+0x135d/0x1cd0 fs/jfs/jfs_xtree.c:-1 xtInsert+0x148/0xe30 fs/jfs/jfs_xtree.c:541 extAlloc+0xa9a/0xfb0 fs/jfs/jfs_extent.c:150 jfs_get_block+0x346/0xab0 fs/jfs/inode.c:248 __block_write_begin_int+0x6b5/0x1900 fs/buffer.c:2151 block_write_begin+0x8a/0x120 fs/buffer.c:2262 jfs_write_begin+0x35/0x80 fs/jfs/inode.c:299 generic_perform_write+0x2c7/0x910 mm/filemap.c:4103 generic_file_write_iter+0x10f/0x540 mm/filemap.c:4246 aio_write+0x532/0x7a0 fs/aio.c:1634 __io_submit_one fs/aio.c:-1 [inline] io_submit_one+0x78b/0x1310 fs/aio.c:2053 __do_sys_io_submit fs/aio.c:2112 [inline] __se_sys_io_submit+0x185/0x2f0 fs/aio.c:2082 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803f0d82e8 which belongs to the cache jfs_mp of size 184 The buggy address is located 40 bytes inside of freed 184-byte region [ffff88803f0d82e8, ffff88803f0d83a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3f0d8 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff88801a377640 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000000f5000000 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 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5319, tgid 5318 (syz.0.0), ts 68122858251, free_ts 66039949528 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1710 prep_new_page mm/page_alloc.c:1718 [inline] get_page_from_freelist+0x21e0/0x22c0 mm/page_alloc.c:3680 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2618 new_slab mm/slub.c:2672 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3858 __slab_alloc mm/slub.c:3948 [inline] __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4203 mempool_alloc_noprof+0x1a4/0x510 mm/mempool.c:402 alloc_metapage fs/jfs/jfs_metapage.c:182 [inline] __get_metapage+0x509/0xde0 fs/jfs/jfs_metapage.c:652 diRead+0x6da/0xb90 fs/jfs/jfs_imap.c:367 jfs_iget+0x89/0x3e0 fs/jfs/inode.c:35 jfs_lookup+0x1c5/0x380 fs/jfs/namei.c:1469 lookup_open fs/namei.c:3686 [inline] open_last_lookups fs/namei.c:3807 [inline] path_openat+0x1101/0x3830 fs/namei.c:4043 do_filp_open+0x1fa/0x410 fs/namei.c:4073 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1463 page last free pid 10 tgid 10 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0xc6e/0xe50 mm/page_alloc.c:2717 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0xca8/0x1710 kernel/rcu/tree.c:2832 handle_softirqs+0x286/0x870 kernel/softirq.c:579 do_softirq+0xec/0x180 kernel/softirq.c:480 __local_bh_enable_ip+0x17d/0x1c0 kernel/softirq.c:407 ipv6_get_lladdr+0x2aa/0x3f0 net/ipv6/addrconf.c:1937 mld_newpack+0x420/0xc40 net/ipv6/mcast.c:1802 add_grhead+0x5a/0x2a0 net/ipv6/mcast.c:1899 add_grec+0x13b2/0x1670 net/ipv6/mcast.c:2037 mld_send_cr net/ipv6/mcast.c:2163 [inline] mld_ifc_work+0x6e6/0xde0 net/ipv6/mcast.c:2702 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88803f0d8200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803f0d8280: 00 00 00 00 00 fc fc fc fc fc fc fc fc fa fb fb >ffff88803f0d8300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803f0d8380: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff88803f0d8400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================