loop0: detected capacity change from 0 to 14901 read_mapping_page failed! jfs_mount: diMount failed w/rc = -5 ================================================================== BUG: KASAN: use-after-free in diFree+0x1fb7/0x2fb0 fs/jfs/jfs_imap.c:871 Read of size 4 at addr ffff8880282c0004 by task syz-executor.0/4234 CPU: 1 PID: 4234 Comm: syz-executor.0 Not tainted 6.1.50-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 diFree+0x1fb7/0x2fb0 fs/jfs/jfs_imap.c:871 jfs_evict_inode+0x329/0x440 fs/jfs/inode.c:156 evict+0x2a4/0x620 fs/inode.c:664 jfs_mount+0x532/0x830 fs/jfs/jfs_mount.c:203 jfs_fill_super+0x598/0xc40 fs/jfs/super.c:556 mount_bdev+0x2c9/0x3f0 fs/super.c:1432 legacy_get_tree+0xeb/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1562 do_new_mount+0x28b/0xae0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3568 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+0x63/0xcd RIP: 0033:0x7f254467e22a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2545410ee8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f2545410f80 RCX: 00007f254467e22a RDX: 0000000020005d00 RSI: 0000000020000000 RDI: 00007f2545410f40 RBP: 0000000020005d00 R08: 00007f2545410f80 R09: 0000000000000003 R10: 0000000000000003 R11: 0000000000000246 R12: 0000000020000000 R13: 00007f2545410f40 R14: 0000000000002364 R15: 0000000020002480 Allocated by task 3938: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc_node_track_caller+0xb1/0x220 mm/slab_common.c:975 kmalloc_reserve net/core/skbuff.c:437 [inline] __alloc_skb+0x130/0x620 net/core/skbuff.c:510 alloc_skb include/linux/skbuff.h:1268 [inline] alloc_skb_with_frags+0xa4/0x740 net/core/skbuff.c:6148 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2733 sock_alloc_send_skb include/net/sock.h:1903 [inline] mld_newpack+0x1c0/0xa90 net/ipv6/mcast.c:1748 add_grhead net/ipv6/mcast.c:1851 [inline] add_grec+0x1492/0x19a0 net/ipv6/mcast.c:1989 mld_send_cr net/ipv6/mcast.c:2115 [inline] mld_ifc_work+0x68f/0xc90 net/ipv6/mcast.c:2653 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439 kthread+0x26e/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff8880282c0000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 4 bytes inside of 2048-byte region [ffff8880282c0000, ffff8880282c0800) The buggy address belongs to the physical page: page:ffffea0000a0b000 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880282c7000 pfn:0x282c0 head:ffffea0000a0b000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001db3a00 dead000000000002 ffff888012442000 raw: ffff8880282c7000 0000000080080000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3938, tgid 3938 (kworker/1:5), ts 84787908866, free_ts 84772922323 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533 prep_new_page mm/page_alloc.c:2540 [inline] get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xa71/0x1080 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0xa0/0x220 mm/slab_common.c:975 kmalloc_reserve net/core/skbuff.c:437 [inline] __alloc_skb+0x130/0x620 net/core/skbuff.c:510 alloc_skb include/linux/skbuff.h:1268 [inline] alloc_skb_with_frags+0xa4/0x740 net/core/skbuff.c:6148 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2733 sock_alloc_send_skb include/net/sock.h:1903 [inline] mld_newpack+0x1c0/0xa90 net/ipv6/mcast.c:1748 add_grhead net/ipv6/mcast.c:1851 [inline] add_grec+0x1492/0x19a0 net/ipv6/mcast.c:1989 mld_send_cr net/ipv6/mcast.c:2115 [inline] mld_ifc_work+0x68f/0xc90 net/ipv6/mcast.c:2653 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1460 [inline] free_pcp_prepare mm/page_alloc.c:1510 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3388 free_unref_page+0x98/0x570 mm/page_alloc.c:3484 free_large_kmalloc+0xfb/0x190 mm/slab_common.c:932 diUnmount+0xef/0x100 fs/jfs/jfs_imap.c:195 jfs_mount+0x53f/0x830 fs/jfs/jfs_mount.c:205 jfs_fill_super+0x598/0xc40 fs/jfs/super.c:556 mount_bdev+0x2c9/0x3f0 fs/super.c:1432 legacy_get_tree+0xeb/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1562 do_new_mount+0x28b/0xae0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3568 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+0x63/0xcd Memory state around the buggy address: ffff8880282bff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880282bff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880282c0000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880282c0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880282c0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================