================================================================== BUG: KASAN: slab-use-after-free in ecryptfs_write_tag_70_packet+0xea0/0xedc fs/ecryptfs/keystore.c:742 Read of size 4 at addr ffff0000d37f3c98 by task syz.5.105/5391 CPU: 0 UID: 0 PID: 5391 Comm: syz.5.105 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/23/2026 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xb0/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0x8c/0xc4 mm/kasan/report.c:595 __asan_report_load_n_noabort+0x1c/0x28 mm/kasan/report_generic.c:391 ecryptfs_write_tag_70_packet+0xea0/0xedc fs/ecryptfs/keystore.c:742 ecryptfs_encrypt_filename fs/ecryptfs/crypto.c:1378 [inline] ecryptfs_encrypt_and_encode_filename+0x3e8/0x7ac fs/ecryptfs/crypto.c:1789 ecryptfs_lookup+0x19c/0x694 fs/ecryptfs/inode.c:402 __lookup_slow+0x1e4/0x2b4 fs/namei.c:1919 lookup_slow+0x60/0x84 fs/namei.c:1936 walk_component fs/namei.c:2311 [inline] lookup_last fs/namei.c:2818 [inline] path_lookupat+0x358/0x798 fs/namei.c:2842 filename_lookup+0x1d0/0x3c8 fs/namei.c:2871 vfs_open_tree+0x29c/0x348 fs/namespace.c:3348 __do_sys_open_tree fs/namespace.c:3363 [inline] __se_sys_open_tree fs/namespace.c:3361 [inline] __arm64_sys_open_tree+0xa4/0x120 fs/namespace.c:3361 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x60/0x1d8 arch/arm64/kernel/entry-common.c:796 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:815 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 Allocated by task 5391: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:78 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:570 poison_kmalloc_redzone mm/kasan/common.c:409 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5414 [inline] __kvmalloc_node_noprof+0x3e0/0x7fc mm/slub.c:7015 __do_sys_add_key security/keys/keyctl.c:116 [inline] __se_sys_add_key security/keys/keyctl.c:74 [inline] __arm64_sys_add_key+0x2e0/0x43c security/keys/keyctl.c:74 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x60/0x1d8 arch/arm64/kernel/entry-common.c:796 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:815 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 Freed by task 5391: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:78 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:264 [inline] __kasan_slab_free+0x74/0xa4 mm/kasan/common.c:296 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2748 [inline] slab_free mm/slub.c:6509 [inline] kfree+0x188/0x658 mm/slub.c:6802 kvfree+0x30/0x40 mm/slub.c:7064 kvfree_sensitive+0x30/0x40 mm/slub.c:7097 __do_sys_add_key security/keys/keyctl.c:147 [inline] __se_sys_add_key security/keys/keyctl.c:74 [inline] __arm64_sys_add_key+0x3cc/0x43c security/keys/keyctl.c:74 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x60/0x1d8 arch/arm64/kernel/entry-common.c:796 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:815 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 The buggy address belongs to the object at ffff0000d37f3c00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 152 bytes inside of freed 256-byte region [ffff0000d37f3c00, ffff0000d37f3d00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1137f2 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0001b40 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0001b40 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 05ffc00000000001 fffffdffc34dfc81 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d37f3b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d37f3c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d37f3c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d37f3d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d37f3d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================