================================================================== 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 ffff0000cf878498 by task syz.4.13/4964 CPU: 1 UID: 0 PID: 4964 Comm: syz.4.13 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/31/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_open+0x7e0/0x1198 fs/namei.c:4536 open_last_lookups fs/namei.c:4774 [inline] path_openat+0x4f8/0x1910 fs/namei.c:5013 do_file_open+0x1c8/0x2e8 fs/namei.c:5045 do_sys_openat2+0x114/0x1ec fs/open.c:1442 do_sys_open+0xb0/0xe0 fs/open.c:1448 __do_sys_openat fs/open.c:1464 [inline] __se_sys_openat fs/open.c:1459 [inline] __arm64_sys_openat+0xa8/0xc4 fs/open.c:1459 __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:797 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:816 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 Allocated by task 4964: 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:5531 [inline] __kvmalloc_node_noprof+0x3e0/0x7fc mm/slub.c:7136 __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:797 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:816 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 Freed by task 4964: 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:2780 [inline] slab_free mm/slub.c:6630 [inline] kfree+0x188/0x658 mm/slub.c:6923 kvfree+0x30/0x40 mm/slub.c:7185 kvfree_sensitive+0x30/0x40 mm/slub.c:7218 __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:797 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:816 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 The buggy address belongs to the object at ffff0000cf878400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 152 bytes inside of freed 256-byte region [ffff0000cf878400, ffff0000cf878500) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f878 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 fffffdffc33e1e01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cf878380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cf878400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000cf878480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000cf878500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cf878580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================