... Log Wrap ... Log Wrap ... Log Wrap ... ================================================================== BUG: KASAN: use-after-free in jfs_lazycommit+0x7d4/0xc30 fs/jfs/jfs_txnmgr.c:2769 Read of size 4 at addr ffff8880505f3a94 by task jfsCommit/276 CPU: 0 PID: 276 Comm: jfsCommit Not tainted 5.15.155-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 jfs_lazycommit+0x7d4/0xc30 fs/jfs/jfs_txnmgr.c:2769 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 Allocated by task 17149: 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+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] jfs_fill_super+0xfb/0xc70 fs/jfs/super.c:500 mount_bdev+0x2c9/0x3f0 fs/super.c:1387 legacy_get_tree+0xeb/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1517 do_new_mount+0x2ba/0xb40 fs/namespace.c:3005 do_mount fs/namespace.c:3348 [inline] __do_sys_mount fs/namespace.c:3556 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3533 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 16462: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd8/0x120 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+0xdd/0x160 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0xf1/0x270 mm/slub.c:4559 generic_shutdown_super+0x136/0x2c0 fs/super.c:475 kill_block_super+0x7a/0xe0 fs/super.c:1414 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/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+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x118/0x8a0 kernel/rcu/tree.c:3596 drop_sysctl_table+0x317/0x460 fs/proc/proc_sysctl.c:1680 drop_sysctl_table+0x329/0x460 fs/proc/proc_sysctl.c:1683 unregister_sysctl_table+0x88/0x130 fs/proc/proc_sysctl.c:1718 neigh_sysctl_unregister+0x74/0x90 net/core/neighbour.c:3732 addrconf_sysctl_unregister net/ipv6/addrconf.c:7147 [inline] addrconf_notify+0x7d5/0xf30 net/ipv6/addrconf.c:3705 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2018 [inline] call_netdevice_notifiers_extack net/core/dev.c:2030 [inline] call_netdevice_notifiers net/core/dev.c:2044 [inline] dev_change_name+0x709/0x9c0 net/core/dev.c:1301 do_setlink+0xa4e/0x3ae0 net/core/rtnetlink.c:2721 __rtnl_newlink net/core/rtnetlink.c:3429 [inline] rtnl_newlink+0x17a4/0x2070 net/core/rtnetlink.c:3549 rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5629 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2505 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x7b6/0x980 net/netlink/af_netlink.c:1356 netlink_sendmsg+0xa30/0xd60 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x564/0x720 net/socket.c:2058 __do_sys_sendto net/socket.c:2070 [inline] __se_sys_sendto net/socket.c:2066 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2066 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Second to last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x1c4/0xa70 kernel/rcu/tree.c:3087 free_fib_info net/ipv4/fib_semantics.c:255 [inline] fib_info_put include/net/ip_fib.h:579 [inline] fib_release_info+0x61c/0x6e0 net/ipv4/fib_semantics.c:281 fib_table_delete+0xfa9/0x11c0 net/ipv4/fib_trie.c:1772 fib_magic net/ipv4/fib_frontend.c:1095 [inline] fib_del_ifaddr+0x1f37/0x2ae0 net/ipv4/fib_frontend.c:1306 fib_inetaddr_event+0xb4/0x2b0 net/ipv4/fib_frontend.c:1437 notifier_call_chain kernel/notifier.c:83 [inline] blocking_notifier_call_chain+0x104/0x1b0 kernel/notifier.c:318 __inet_del_ifa+0x87b/0x1020 net/ipv4/devinet.c:428 inet_del_ifa net/ipv4/devinet.c:465 [inline] inetdev_destroy net/ipv4/devinet.c:318 [inline] inetdev_event+0x62b/0x1490 net/ipv4/devinet.c:1598 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2018 [inline] call_netdevice_notifiers_extack net/core/dev.c:2030 [inline] call_netdevice_notifiers net/core/dev.c:2044 [inline] unregister_netdevice_many+0xf1b/0x18f0 net/core/dev.c:11093 default_device_exit_batch+0x390/0x3f0 net/core/dev.c:11626 ops_exit_list net/core/net_namespace.c:174 [inline] cleanup_net+0x763/0xb60 net/core/net_namespace.c:596 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 The buggy address belongs to the object at ffff8880505f3a00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of 256-byte region [ffff8880505f3a00, ffff8880505f3b00) The buggy address belongs to the page: page:ffffea0001417c80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x505f2 head:ffffea0001417c80 order:1 compound_mapcount:0 flags: 0xfff80000010200(slab|head|node=0|zone=1|lastcpupid=0xfff) raw: 00fff80000010200 ffffea0001e1f700 0000000800000002 ffff888011c41b40 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8176, ts 281829164574, free_ts 262270592814 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 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+0x1c9/0x300 mm/slub.c:4403 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] fib_create_info+0xaab/0x2570 net/ipv4/fib_semantics.c:1478 fib_table_insert+0x213/0x1f90 net/ipv4/fib_trie.c:1231 fib_magic net/ipv4/fib_frontend.c:1093 [inline] fib_add_ifaddr+0x47f/0x1730 net/ipv4/fib_frontend.c:1115 fib_netdev_event+0x61d/0x760 net/ipv4/fib_frontend.c:1475 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 __dev_notify_flags+0x304/0x610 dev_change_flags+0xe7/0x190 net/core/dev.c:8889 do_setlink+0xcd1/0x3ae0 net/core/rtnetlink.c:2741 __rtnl_newlink net/core/rtnetlink.c:3429 [inline] rtnl_newlink+0x17a4/0x2070 net/core/rtnetlink.c:3549 rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5629 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2505 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+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 do_slab_free mm/slub.c:3487 [inline] ___cache_free+0xe3/0x100 mm/slub.c:3506 qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x120/0x300 mm/slub.c:4403 kmalloc include/linux/slab.h:596 [inline] tomoyo_realpath_from_path+0xd8/0x5e0 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x273/0x6b0 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x120 security/security.c:1348 vfs_getattr+0x26/0x360 fs/stat.c:157 vfs_statx+0x18f/0x3b0 fs/stat.c:225 vfs_fstatat fs/stat.c:243 [inline] __do_sys_newfstatat fs/stat.c:411 [inline] __se_sys_newfstatat fs/stat.c:405 [inline] __x64_sys_newfstatat+0x12c/0x1b0 fs/stat.c:405 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff8880505f3980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880505f3a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880505f3a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880505f3b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880505f3b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================