================================================================== BUG: KASAN: slab-use-after-free in write_special_inodes fs/jfs/jfs_logmgr.c:209 [inline] BUG: KASAN: slab-use-after-free in jfs_flush_journal+0x843/0xec0 fs/jfs/jfs_logmgr.c:1573 Read of size 8 at addr ffff88801de090b0 by task syz-executor.3/5091 CPU: 0 PID: 5091 Comm: syz-executor.3 Not tainted 6.8.0-rc5-syzkaller-00163-gffd2cb6b718e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0x167/0x540 mm/kasan/report.c:488 kasan_report+0x142/0x180 mm/kasan/report.c:601 write_special_inodes fs/jfs/jfs_logmgr.c:209 [inline] jfs_flush_journal+0x843/0xec0 fs/jfs/jfs_logmgr.c:1573 jfs_umount+0x170/0x3a0 fs/jfs/jfs_umount.c:58 jfs_put_super+0x8a/0x190 fs/jfs/super.c:194 generic_shutdown_super+0x136/0x2d0 fs/super.c:646 kill_block_super+0x44/0x90 fs/super.c:1680 deactivate_locked_super+0xc4/0x130 fs/super.c:477 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1267 task_work_run+0x24e/0x310 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:108 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x167/0x370 kernel/entry/common.c:212 do_syscall_64+0x108/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7ff42e67f0d7 Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffd4977e088 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007ff42e67f0d7 RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffd4977e140 RBP: 00007ffd4977e140 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffd4977f200 R13: 00007ff42e6c93b9 R14: 00000000000dc0c2 R15: 0000000000000005 Allocated by task 18304: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:372 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:389 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace+0x1d6/0x360 mm/slub.c:4012 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:711 [inline] jfs_fill_super+0xff/0xc50 fs/jfs/super.c:495 mount_bdev+0x20a/0x2d0 fs/super.c:1663 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1784 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 Freed by task 5089: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x4e/0x60 mm/kasan/generic.c:640 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:241 __kasan_slab_free+0x34/0x70 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kfree+0x14a/0x380 mm/slub.c:4409 generic_shutdown_super+0x136/0x2d0 fs/super.c:646 kill_block_super+0x44/0x90 fs/super.c:1680 deactivate_locked_super+0xc4/0x130 fs/super.c:477 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1267 task_work_run+0x24e/0x310 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:108 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x167/0x370 kernel/entry/common.c:212 do_syscall_64+0x108/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6f/0x77 The buggy address belongs to the object at ffff88801de09000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 176 bytes inside of freed 256-byte region [ffff88801de09000, ffff88801de09100) The buggy address belongs to the physical page: page:ffffea0000778200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1de08 head:ffffea0000778200 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888014c41b40 ffffea00009e4b00 dead000000000004 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5086, tgid 5086 (syz-executor.4), ts 151395059265, free_ts 151347029212 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311 __alloc_pages+0x255/0x680 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page+0x5f/0x160 mm/slub.c:2190 allocate_slab mm/slub.c:2354 [inline] new_slab+0x84/0x2f0 mm/slub.c:2407 ___slab_alloc+0xd17/0x13e0 mm/slub.c:3540 __slab_alloc mm/slub.c:3625 [inline] __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] __do_kmalloc_node mm/slub.c:3980 [inline] __kmalloc+0x2e0/0x490 mm/slub.c:3994 kmalloc include/linux/slab.h:594 [inline] kzalloc include/linux/slab.h:711 [inline] new_dir fs/proc/proc_sysctl.c:956 [inline] get_subdir fs/proc/proc_sysctl.c:1000 [inline] sysctl_mkdir_p fs/proc/proc_sysctl.c:1295 [inline] __register_sysctl_table+0xb30/0x1440 fs/proc/proc_sysctl.c:1376 mpls_dev_sysctl_register+0x203/0x2f0 net/mpls/af_mpls.c:1422 mpls_add_dev net/mpls/af_mpls.c:1478 [inline] mpls_dev_notify+0x33f/0x7a0 net/mpls/af_mpls.c:1618 notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2004 [inline] call_netdevice_notifiers net/core/dev.c:2018 [inline] register_netdevice+0x151f/0x19c0 net/core/dev.c:10294 ipvlan_link_new+0x38e/0xa30 drivers/net/ipvlan/ipvlan_main.c:588 rtnl_newlink_create net/core/rtnetlink.c:3518 [inline] __rtnl_newlink net/core/rtnetlink.c:3738 [inline] rtnl_newlink+0x158f/0x20a0 net/core/rtnetlink.c:3751 rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6618 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543 page last free pid 5098 tgid 5098 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x95d/0xa80 mm/page_alloc.c:2346 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2486 rcu_do_batch kernel/rcu/tree.c:2190 [inline] rcu_core+0xd76/0x1810 kernel/rcu/tree.c:2465 __do_softirq+0x2bb/0x942 kernel/softirq.c:553 Memory state around the buggy address: ffff88801de08f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801de09000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801de09080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801de09100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801de09180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================