================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x114/0x7638 kernel/locking/lockdep.c:4882 Read of size 8 at addr ffff0000d5c498d8 by task jfsCommit/238 CPU: 0 PID: 238 Comm: jfsCommit Not tainted 5.15.167-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/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_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 __lock_acquire+0x114/0x7638 kernel/locking/lockdep.c:4882 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 __mutex_lock_common+0x380/0x2154 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743 jfs_syncpt+0x30/0x98 fs/jfs/jfs_logmgr.c:1047 txEnd+0x2e0/0x574 fs/jfs/jfs_txnmgr.c:549 txLazyCommit fs/jfs/jfs_txnmgr.c:2718 [inline] jfs_lazycommit+0x4d4/0xa40 fs/jfs/jfs_txnmgr.c:2766 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Allocated by task 5181: 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] open_inline_log fs/jfs/jfs_logmgr.c:1167 [inline] lmLogOpen+0x290/0xdc0 fs/jfs/jfs_logmgr.c:1077 jfs_mount_rw+0xe4/0x57c fs/jfs/jfs_mount.c:253 jfs_fill_super+0x508/0xa08 fs/jfs/super.c:570 mount_bdev+0x274/0x370 fs/super.c:1398 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:1528 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 4028: 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 lmLogClose+0x270/0x4d8 jfs_umount+0x24c/0x338 fs/jfs/jfs_umount.c:116 jfs_put_super+0x90/0x188 fs/jfs/super.c:194 generic_shutdown_super+0x130/0x29c fs/super.c:475 kill_block_super+0x70/0xdc fs/super.c:1425 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:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x262c/0x32b8 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609 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 kvfree_call_rcu+0xb8/0x684 kernel/rcu/tree.c:3596 neigh_destroy+0x474/0x6f4 net/core/neighbour.c:860 neigh_release include/net/neighbour.h:419 [inline] neigh_cleanup_and_release+0x140/0x390 net/core/neighbour.c:103 neigh_del net/core/neighbour.c:197 [inline] neigh_remove_one+0x45c/0x5a0 net/core/neighbour.c:218 neigh_forced_gc net/core/neighbour.c:251 [inline] neigh_alloc net/core/neighbour.c:429 [inline] ___neigh_create+0x4c0/0x24fc net/core/neighbour.c:591 __neigh_create+0x44/0x58 net/core/neighbour.c:679 ip6_finish_output2+0xc8c/0x1cec net/ipv6/ip6_output.c:127 __ip6_finish_output+0x580/0x6ec net/ipv6/ip6_output.c:201 ip6_finish_output+0x40/0x218 net/ipv6/ip6_output.c:211 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x274/0x594 net/ipv6/ip6_output.c:234 dst_output include/net/dst.h:443 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ndisc_send_skb+0xbf8/0x1788 net/ipv6/ndisc.c:511 ndisc_send_ns+0x538/0x6ec net/ipv6/ndisc.c:653 ndisc_solicit+0x2f4/0x47c neigh_probe+0xc4/0x138 net/core/neighbour.c:1017 __neigh_event_send+0xca4/0x1338 net/core/neighbour.c:1178 neigh_event_send include/net/neighbour.h:438 [inline] neigh_resolve_output+0x178/0x5dc net/core/neighbour.c:1488 neigh_output include/net/neighbour.h:509 [inline] ip6_finish_output2+0x1360/0x1cec net/ipv6/ip6_output.c:130 __ip6_finish_output+0x580/0x6ec net/ipv6/ip6_output.c:201 ip6_finish_output+0x40/0x218 net/ipv6/ip6_output.c:211 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x274/0x594 net/ipv6/ip6_output.c:234 dst_output include/net/dst.h:443 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ip6_xmit+0x1114/0x1afc net/ipv6/ip6_output.c:338 tcp_v6_send_synack+0x6ec/0xc90 net/ipv6/tcp_ipv6.c:560 tcp_conn_request+0x17e4/0x2554 net/ipv4/tcp_input.c:7039 tcp_v6_conn_request+0x264/0x388 net/ipv6/tcp_ipv6.c:1218 tcp_rcv_state_process+0x1174/0x3e2c net/ipv4/tcp_input.c:6485 tcp_v6_do_rcv+0x708/0x1360 net/ipv6/tcp_ipv6.c:1551 tcp_v6_rcv+0x1ba4/0x2360 net/ipv6/tcp_ipv6.c:1755 ip6_protocol_deliver_rcu+0x8f0/0x1134 net/ipv6/ip6_input.c:425 ip6_input_finish+0xc8/0x174 net/ipv6/ip6_input.c:466 NF_HOOK+0x324/0x3d0 include/linux/netfilter.h:302 ip6_input+0x70/0x84 net/ipv6/ip6_input.c:475 dst_input include/net/dst.h:453 [inline] ip6_rcv_finish+0x1fc/0x234 net/ipv6/ip6_input.c:79 NF_HOOK+0x324/0x3d0 include/linux/netfilter.h:302 ipv6_rcv+0x98/0xb8 net/ipv6/ip6_input.c:300 __netif_receive_skb_one_core net/core/dev.c:5485 [inline] __netif_receive_skb+0x18c/0x400 net/core/dev.c:5599 netif_receive_skb_internal net/core/dev.c:5685 [inline] netif_receive_skb+0x1e0/0x8c4 net/core/dev.c:5744 tun_rx_batched+0x568/0x6e4 tun_get_user+0x2320/0x3774 drivers/net/tun.c:1989 tun_chr_write_iter+0xfc/0x20c drivers/net/tun.c:2019 call_write_iter include/linux/fs.h:2172 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x884/0xb44 fs/read_write.c:594 ksys_write+0x15c/0x26c fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:656 __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 ffff0000d5c49800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 216 bytes inside of 1024-byte region [ffff0000d5c49800, ffff0000d5c49c00) The buggy address belongs to the page: page:00000000eb8fcc28 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x115c48 head:00000000eb8fcc28 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 dead000000000100 dead000000000122 ffff0000c0002780 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d5c49780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d5c49800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d5c49880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d5c49900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d5c49980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Unable to handle kernel paging request at virtual address dfff800000000006 Mem abort info: ESR = 0x0000000096000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 [dfff800000000006] address between user and kernel address ranges Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 238 Comm: jfsCommit Tainted: G B 5.15.167-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : write_special_inodes fs/jfs/jfs_logmgr.c:207 [inline] pc : lmLogSync+0xec/0x98c fs/jfs/jfs_logmgr.c:943 lr : write_special_inodes fs/jfs/jfs_logmgr.c:207 [inline] lr : lmLogSync+0xe0/0x98c fs/jfs/jfs_logmgr.c:943 sp : ffff80001f7f7b00 x29: ffff80001f7f7bc0 x28: ffff80001f139000 x27: dfff800000000000 x26: ffff0000d5c49800 x25: ffff80001f7f7b20 x24: 1ffff00002a02aac x23: 0000000000000001 x22: 0000000000000006 x21: 0000000000000030 x20: ffff0000d24d1aa8 x19: ffff0000d5c49800 x18: 1fffe00036831b8e x17: 1fffe00036831b8e x16: ffff800011ac1408 x15: ffff800014b5ef40 x14: ffff0001b418dc80 x13: ffff0001b418dc7c x12: ffff700003efef6c x11: 0000000000000000 x10: 0000000000000000 x9 : ffff80001b7833d0 x8 : 0000000000000006 x7 : 0000000000000000 x6 : ffff80000826acb8 x5 : 0000000000000000 x4 : 0000000000000004 x3 : ffff8000098f2da0 x2 : 0000000000000000 x1 : 0000000000000008 x0 : 0000000000000000 Call trace: write_special_inodes fs/jfs/jfs_logmgr.c:207 [inline] lmLogSync+0xec/0x98c fs/jfs/jfs_logmgr.c:943 jfs_syncpt+0x74/0x98 fs/jfs/jfs_logmgr.c:1049 txEnd+0x2e0/0x574 fs/jfs/jfs_txnmgr.c:549 txLazyCommit fs/jfs/jfs_txnmgr.c:2718 [inline] jfs_lazycommit+0x4d4/0xa40 fs/jfs/jfs_txnmgr.c:2766 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Code: 97bf8d45 f94002a8 9100c115 d343fea8 (387b6908) ---[ end trace adb380451cabfff0 ]--- ---------------- Code disassembly (best guess): 0: 97bf8d45 bl 0xfffffffffefe3514 4: f94002a8 ldr x8, [x21] 8: 9100c115 add x21, x8, #0x30 c: d343fea8 lsr x8, x21, #3 * 10: 387b6908 ldrb w8, [x8, x27] <-- trapping instruction