================================================================== BUG: KASAN: use-after-free in jfs_lazycommit+0x620/0x918 fs/jfs/jfs_txnmgr.c:2736 Read of size 4 at addr ffff0000c4b98894 by task jfsCommit/93 CPU: 1 PID: 93 Comm: jfsCommit Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x88/0x218 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:420 kasan_report+0xa8/0x100 mm/kasan/report.c:524 __asan_report_load4_noabort+0x2c/0x38 mm/kasan/report_generic.c:350 jfs_lazycommit+0x620/0x918 fs/jfs/jfs_txnmgr.c:2736 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850 Allocated by task 4674: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x28/0x34 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace+0x7c/0x94 mm/slab_common.c:1031 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] jfs_fill_super+0xdc/0x948 fs/jfs/super.c:495 mount_bdev+0x264/0x358 fs/super.c:1443 jfs_do_mount+0x44/0x58 fs/jfs/super.c:670 legacy_get_tree+0xd4/0x16c fs/fs_context.c:632 vfs_get_tree+0x90/0x274 fs/super.c:1573 do_new_mount+0x228/0x810 fs/namespace.c:3078 path_mount+0x5b4/0xe78 fs/namespace.c:3408 do_mount fs/namespace.c:3421 [inline] __do_sys_mount fs/namespace.c:3629 [inline] __se_sys_mount fs/namespace.c:3606 [inline] __arm64_sys_mount+0x49c/0x584 fs/namespace.c:3606 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Freed by task 4319: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x3c/0x60 mm/kasan/generic.c:516 ____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1729 [inline] slab_free_freelist_hook+0x16c/0x1ec mm/slub.c:1755 slab_free mm/slub.c:3687 [inline] __kmem_cache_free+0xc0/0x224 mm/slub.c:3700 kfree+0xd0/0x1ac mm/slab_common.c:988 jfs_put_super+0x144/0x188 fs/jfs/super.c:203 generic_shutdown_super+0x130/0x324 fs/super.c:501 kill_block_super+0x70/0xdc fs/super.c:1470 deactivate_locked_super+0xac/0x124 fs/super.c:332 deactivate_super+0xe8/0x108 fs/super.c:363 cleanup_mnt+0x37c/0x404 fs/namespace.c:1191 __cleanup_mnt+0x20/0x30 fs/namespace.c:1198 task_work_run+0x1ec/0x270 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x2038/0x2b28 arch/arm64/kernel/signal.c:1137 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x138 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 insert_work+0x64/0x37c kernel/workqueue.c:1361 __queue_work+0xcbc/0x123c kernel/workqueue.c:1520 queue_work_on+0xc0/0x16c kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x704/0x7f8 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:2001 [inline] call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers+0x10c/0x18c net/core/dev.c:2053 register_netdevice+0x1188/0x15cc net/core/dev.c:10237 veth_newlink+0x62c/0xa24 drivers/net/veth.c:1756 rtnl_newlink_create net/core/rtnetlink.c:3422 [inline] __rtnl_newlink net/core/rtnetlink.c:3642 [inline] rtnl_newlink+0x102c/0x1a1c net/core/rtnetlink.c:3655 rtnetlink_rcv_msg+0x734/0xce4 net/core/rtnetlink.c:6150 netlink_rcv_skb+0x208/0x3c4 net/netlink/af_netlink.c:2511 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6168 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x60c/0x824 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6e8/0x9b0 net/netlink/af_netlink.c:1872 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x304/0x3fc net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2161 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Second to last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 insert_work+0x64/0x37c kernel/workqueue.c:1361 __queue_work+0xcbc/0x123c kernel/workqueue.c:1520 queue_work_on+0xc0/0x16c kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] call_usermodehelper_exec+0x22c/0x480 kernel/umh.c:437 call_modprobe kernel/kmod.c:98 [inline] __request_module+0x440/0xa90 kernel/kmod.c:170 crypto_larval_lookup crypto/api.c:289 [inline] crypto_alg_mod_lookup+0xd0/0x500 crypto/api.c:332 crypto_find_alg crypto/api.c:588 [inline] crypto_alloc_tfm_node+0x140/0x34c crypto/api.c:625 crypto_alloc_tfm crypto/internal.h:109 [inline] crypto_alloc_shash+0x40/0x54 crypto/shash.c:520 kdf_test include/crypto/internal/kdf_selftest.h:40 [inline] crypto_kdf108_init+0x70/0x230 crypto/kdf_sp800108.c:128 do_one_initcall+0x24c/0x9cc init/main.c:1310 do_initcall_level+0x154/0x214 init/main.c:1383 do_initcalls+0x58/0xac init/main.c:1399 do_basic_setup+0x8c/0xa0 init/main.c:1418 kernel_init_freeable+0x35c/0x4f8 init/main.c:1638 kernel_init+0x24/0x1d8 init/main.c:1526 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850 The buggy address belongs to the object at ffff0000c4b98800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of 256-byte region [ffff0000c4b98800, ffff0000c4b98900) The buggy address belongs to the physical page: page:00000000dbadf4dc refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104b98 head:00000000dbadf4dc order:1 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc000312e200 dead000000000002 ffff0000c0002480 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c4b98780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c4b98800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000c4b98880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000c4b98900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c4b98980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================