================================================================== BUG: KASAN: use-after-free in jfs_lazycommit+0x658/0xa40 fs/jfs/jfs_txnmgr.c:2769 Read of size 4 at addr ffff0000ced40294 by task jfsCommit/234 CPU: 1 PID: 234 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_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 __asan_report_load4_noabort+0x44/0x50 mm/kasan/report_generic.c:308 jfs_lazycommit+0x658/0xa40 fs/jfs/jfs_txnmgr.c:2769 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Allocated by task 4225: 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+0xbc/0xfc mm/kasan/common.c:513 __kasan_kmalloc+0x10/0x1c mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x27c/0x47c mm/slub.c:3247 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] jfs_fill_super+0x108/0xa08 fs/jfs/super.c:500 mount_bdev+0x274/0x370 fs/super.c:1387 jfs_do_mount+0x44/0x58 fs/jfs/super.c:675 legacy_get_tree+0xd4/0x16c fs/fs_context.c:611 vfs_get_tree+0x90/0x274 fs/super.c:1517 do_new_mount+0x278/0x8fc fs/namespace.c:3005 path_mount+0x594/0x101c fs/namespace.c:3335 do_mount fs/namespace.c:3348 [inline] __do_sys_mount fs/namespace.c:3556 [inline] __se_sys_mount fs/namespace.c:3533 [inline] __arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3533 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Freed by task 3992: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0x128/0x1ec mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0x178/0x410 mm/slub.c:4559 jfs_put_super+0x144/0x188 fs/jfs/super.c:203 generic_shutdown_super+0x130/0x29c fs/super.c:475 kill_block_super+0x70/0xdc fs/super.c:1414 deactivate_locked_super+0xb8/0x13c fs/super.c:335 deactivate_super+0x108/0x128 fs/super.c:366 cleanup_mnt+0x3c0/0x474 fs/namespace.c:1143 __cleanup_mnt+0x20/0x30 fs/namespace.c:1150 task_work_run+0x130/0x1e4 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0x670/0x20bc kernel/exit.c:872 do_group_exit+0x110/0x268 kernel/exit.c:994 __do_sys_exit_group kernel/exit.c:1005 [inline] __se_sys_exit_group kernel/exit.c:1003 [inline] __wake_up_parent+0x0/0x60 kernel/exit.c:1003 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x118/0xb40 kernel/rcu/tree.c:3087 free_fib_info+0x68/0xa8 net/ipv4/fib_semantics.c:255 fib_create_info+0x1488/0x1e18 net/ipv4/fib_semantics.c:1608 fib_table_insert+0x1bc/0x1550 net/ipv4/fib_trie.c:1231 fib_magic net/ipv4/fib_frontend.c:1093 [inline] fib_add_ifaddr+0xba0/0x122c net/ipv4/fib_frontend.c:1137 fib_netdev_event+0x564/0x6d4 net/ipv4/fib_frontend.c:1475 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 __dev_notify_flags+0x2ac/0x534 dev_change_flags+0xc8/0x154 net/core/dev.c:8889 do_setlink+0xaa4/0x3164 net/core/rtnetlink.c:2741 __rtnl_newlink net/core/rtnetlink.c:3429 [inline] rtnl_newlink+0x12fc/0x1af4 net/core/rtnetlink.c:3549 rtnetlink_rcv_msg+0xa74/0xdac net/core/rtnetlink.c:5629 netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2505 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5647 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x388/0x4d0 net/socket.c:2058 __do_sys_sendto net/socket.c:2070 [inline] __se_sys_sendto net/socket.c:2066 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2066 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 The buggy address belongs to the object at ffff0000ced40200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of 256-byte region [ffff0000ced40200, ffff0000ced40300) The buggy address belongs to the page: page:00000000c37fda1b refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10ed40 head:00000000c37fda1b order:1 compound_mapcount:0 flags: 0x5ffe00000010200(slab|head|node=0|zone=2|lastcpupid=0xfff) raw: 05ffe00000010200 0000000000000000 0000000100000001 ffff0000c0002480 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ced40180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000ced40200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000ced40280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000ced40300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000ced40380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================