================================================================== BUG: KASAN: slab-use-after-free in jfs_lazycommit+0xa1f/0xb10 fs/jfs/jfs_txnmgr.c:2735 Read of size 4 at addr ffff888021120c94 by task jfsCommit/110 CPU: 0 PID: 110 Comm: jfsCommit Not tainted 6.7.0-rc1-syzkaller-00012-g9bacdd8996c7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 jfs_lazycommit+0xa1f/0xb10 fs/jfs/jfs_txnmgr.c:2735 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Allocated by task 26926: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] jfs_fill_super+0xe5/0xd20 fs/jfs/super.c:495 mount_bdev+0x1f3/0x2e0 fs/super.c:1650 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8c/0x370 fs/super.c:1771 do_new_mount fs/namespace.c:3337 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3664 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount fs/namespace.c:3863 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3863 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Freed by task 5111: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xc0/0x180 mm/slub.c:3822 generic_shutdown_super+0x161/0x3d0 fs/super.c:696 kill_block_super+0x3b/0x90 fs/super.c:1667 deactivate_locked_super+0xbc/0x1a0 fs/super.c:484 deactivate_super+0xde/0x100 fs/super.c:517 cleanup_mnt+0x222/0x450 fs/namespace.c:1256 task_work_run+0x14d/0x240 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x217/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1e/0x60 kernel/entry/common.c:296 do_syscall_64+0x4d/0x110 arch/x86/entry/common.c:88 entry_SYSCALL_64_after_hwframe+0x63/0x6b Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3400 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 __devinet_sysctl_unregister net/ipv4/devinet.c:2630 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2658 [inline] inetdev_destroy net/ipv4/devinet.c:328 [inline] inetdev_event+0x13de/0x1980 net/ipv4/devinet.c:1623 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x130 net/core/dev.c:1965 call_netdevice_notifiers_extack net/core/dev.c:2003 [inline] call_netdevice_notifiers net/core/dev.c:2017 [inline] unregister_netdevice_many_notify+0x85b/0x19a0 net/core/dev.c:10983 ip_tunnel_delete_nets+0x303/0x400 net/ipv4/ip_tunnel.c:1144 ops_exit_list+0x125/0x170 net/core/net_namespace.c:175 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0x886/0x15d0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Second to last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3400 drop_sysctl_table+0x1d4/0x3b0 fs/proc/proc_sysctl.c:1508 unregister_sysctl_table fs/proc/proc_sysctl.c:1529 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1521 neigh_sysctl_unregister+0x5f/0x80 net/core/neighbour.c:3873 devinet_sysctl_unregister net/ipv4/devinet.c:2659 [inline] inetdev_destroy net/ipv4/devinet.c:328 [inline] inetdev_event+0x1438/0x1980 net/ipv4/devinet.c:1623 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x130 net/core/dev.c:1965 call_netdevice_notifiers_extack net/core/dev.c:2003 [inline] call_netdevice_notifiers net/core/dev.c:2017 [inline] unregister_netdevice_many_notify+0x85b/0x19a0 net/core/dev.c:10983 unregister_netdevice_many net/core/dev.c:11039 [inline] unregister_netdevice_queue+0x2e5/0x3d0 net/core/dev.c:10919 unregister_netdevice include/linux/netdevice.h:3136 [inline] nsim_destroy+0x43/0x190 drivers/net/netdevsim/netdev.c:412 __nsim_dev_port_del+0x189/0x240 drivers/net/netdevsim/dev.c:1425 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1437 [inline] nsim_dev_reload_destroy+0x108/0x4d0 drivers/net/netdevsim/dev.c:1658 nsim_dev_reload_down+0x6e/0xd0 drivers/net/netdevsim/dev.c:965 devlink_reload+0x11c/0x460 net/devlink/dev.c:439 devlink_nl_reload_doit+0x588/0x1400 net/devlink/dev.c:562 genl_family_rcv_msg_doit+0x1fc/0x2e0 net/netlink/genetlink.c:972 genl_family_rcv_msg net/netlink/genetlink.c:1052 [inline] genl_rcv_msg+0x561/0x800 net/netlink/genetlink.c:1067 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x53b/0x810 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x93c/0xe40 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff888021120c00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of freed 256-byte region [ffff888021120c00, ffff888021120d00) The buggy address belongs to the physical page: page:ffffea0000844800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21120 head:ffffea0000844800 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 ffff888013041b40 dead000000000100 dead000000000122 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 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5157, tgid 5157 (kworker/1:6), ts 522850370298, free_ts 522449152966 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab mm/slub.c:2017 [inline] new_slab+0x283/0x3c0 mm/slub.c:2070 ___slab_alloc+0x979/0x1500 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x310 mm/slub.c:3517 kmalloc_trace+0x25/0x60 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] br_multicast_new_group.part.0+0x12a/0x680 net/bridge/br_multicast.c:1295 br_multicast_new_group net/bridge/br_multicast.c:1530 [inline] __br_multicast_add_group+0x3d9/0x650 net/bridge/br_multicast.c:1520 br_multicast_add_group net/bridge/br_multicast.c:1569 [inline] br_ip6_multicast_add_group+0x280/0x330 net/bridge/br_multicast.c:1621 br_ip6_multicast_mld2_report net/bridge/br_multicast.c:2974 [inline] br_multicast_ipv6_rcv net/bridge/br_multicast.c:3912 [inline] br_multicast_rcv+0xd06/0x6740 net/bridge/br_multicast.c:3970 br_dev_xmit+0x822/0x18a0 net/bridge/br_device.c:90 __netdev_start_xmit include/linux/netdevice.h:4918 [inline] netdev_start_xmit include/linux/netdevice.h:4932 [inline] xmit_one net/core/dev.c:3543 [inline] dev_hard_start_xmit+0x13d/0x6d0 net/core/dev.c:3559 __dev_queue_xmit+0x7c1/0x3d60 net/core/dev.c:4344 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x819/0x1680 kernel/rcu/tree.c:2431 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Memory state around the buggy address: ffff888021120b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888021120c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888021120c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888021120d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888021120d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================