================================================================== BUG: KASAN: use-after-free in jfs_lazycommit+0x763/0xb20 fs/jfs/jfs_txnmgr.c:2769 Read of size 4 at addr ffff888076e20694 by task jfsCommit/276 CPU: 1 PID: 276 Comm: jfsCommit Not tainted 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 jfs_lazycommit+0x763/0xb20 fs/jfs/jfs_txnmgr.c:2769 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 10865: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:735 [inline] jfs_fill_super+0xd2/0xaf0 fs/jfs/super.c:500 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3014 do_mount fs/namespace.c:3357 [inline] __do_sys_mount fs/namespace.c:3565 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3542 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 9378: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0xef/0x2a0 mm/slub.c:4559 generic_shutdown_super+0x130/0x300 fs/super.c:475 kill_block_super+0x7c/0xe0 fs/super.c:1427 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x418/0x4d0 fs/namespace.c:1143 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x10a/0x7c0 kernel/rcu/tree.c:3596 drop_sysctl_table+0x2fa/0x430 fs/proc/proc_sysctl.c:1681 drop_sysctl_table+0x2e9/0x430 fs/proc/proc_sysctl.c:1684 unregister_sysctl_table+0x87/0x130 fs/proc/proc_sysctl.c:1719 __devinet_sysctl_unregister net/ipv4/devinet.c:2627 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2655 [inline] inetdev_destroy net/ipv4/devinet.c:326 [inline] inetdev_event+0x6f5/0x1360 net/ipv4/devinet.c:1612 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] unregister_netdevice_many+0xf57/0x18f0 net/core/dev.c:11134 unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:11067 unregister_netdevice include/linux/netdevice.h:3020 [inline] lapbeth_free_device drivers/net/wan/lapbether.c:437 [inline] lapbeth_device_event+0x63c/0x9e0 drivers/net/wan/lapbether.c:472 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] unregister_netdevice_many+0xf57/0x18f0 net/core/dev.c:11134 unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:11067 unregister_netdevice include/linux/netdevice.h:3020 [inline] nsim_destroy+0x49/0x150 drivers/net/netdevsim/netdev.c:382 __nsim_dev_port_del+0x155/0x1c0 drivers/net/netdevsim/dev.c:1349 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1362 [inline] nsim_dev_reload_destroy+0x16c/0x240 drivers/net/netdevsim/dev.c:1561 nsim_dev_remove+0x59/0x100 drivers/net/netdevsim/dev.c:1577 __device_release_driver drivers/base/dd.c:1227 [inline] device_release_driver_internal+0x475/0x750 drivers/base/dd.c:1262 bus_remove_device+0x2e2/0x400 drivers/base/bus.c:531 device_del+0x628/0xa70 drivers/base/core.c:3600 device_unregister+0x1c/0xc0 drivers/base/core.c:3633 nsim_bus_dev_del drivers/net/netdevsim/bus.c:454 [inline] del_device_store+0x27d/0x380 drivers/net/netdevsim/bus.c:354 kernfs_fop_write_iter+0x379/0x4c0 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2172 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x712/0xd00 fs/read_write.c:594 ksys_write+0x14d/0x250 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Second to last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x179/0x920 kernel/rcu/tree.c:3087 fib_create_info+0x196e/0x24f0 net/ipv4/fib_semantics.c:1608 fib_table_insert+0x15c/0x1de0 net/ipv4/fib_trie.c:1231 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1092 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1114 fib_netdev_event+0x35c/0x480 net/ipv4/fib_frontend.c:1474 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929 do_setlink+0xc01/0x3980 net/core/rtnetlink.c:2779 __rtnl_newlink net/core/rtnetlink.c:3450 [inline] rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3572 rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x77c/0x920 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x423/0x580 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2071 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888076e20600 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of 256-byte region [ffff888076e20600, ffff888076e20700) The buggy address belongs to the page: page:ffffea0001db8800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76e20 head:ffffea0001db8800 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016841b40 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 4169, ts 74934074667, free_ts 74685653297 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1cd/0x330 mm/slub.c:4403 kmalloc include/linux/slab.h:609 [inline] kzalloc include/linux/slab.h:735 [inline] fib_create_info+0xabc/0x24f0 net/ipv4/fib_semantics.c:1478 fib_table_insert+0x15c/0x1de0 net/ipv4/fib_trie.c:1231 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1092 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1114 fib_inetaddr_event+0x13c/0x1c0 net/ipv4/fib_frontend.c:1428 notifier_call_chain kernel/notifier.c:83 [inline] blocking_notifier_call_chain+0x103/0x1b0 kernel/notifier.c:318 __inet_insert_ifa+0x9e9/0xbc0 net/ipv4/devinet.c:568 inet_rtm_newaddr+0x940/0x1800 net/ipv4/devinet.c:967 rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x77c/0x920 net/netlink/af_netlink.c:1337 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc_trace+0x103/0x2a0 mm/slub.c:3245 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:735 [inline] nsim_fib4_rt_create drivers/net/netdevsim/fib.c:278 [inline] nsim_fib4_rt_insert drivers/net/netdevsim/fib.c:424 [inline] nsim_fib4_event drivers/net/netdevsim/fib.c:462 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:882 [inline] nsim_fib_event_work+0x860/0x3240 drivers/net/netdevsim/fib.c:1483 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 process_scheduled_works kernel/workqueue.c:2373 [inline] worker_thread+0xdca/0x12a0 kernel/workqueue.c:2459 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff888076e20580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076e20600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888076e20680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888076e20700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076e20780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================