================================================================== BUG: KASAN: slab-out-of-bounds in ecryptfs_write_tag_70_packet+0x11d4/0x1258 fs/ecryptfs/keystore.c:764 Read of size 4 at addr ffff0000cd77f898 by task syz.2.19/4573 CPU: 0 PID: 4573 Comm: syz.2.19 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call trace: dump_backtrace+0x1c4/0x1f0 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+0xf4/0x15c 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/0xfc mm/kasan/report.c:524 __asan_report_load_n_noabort+0x28/0x34 mm/kasan/report_generic.c:361 ecryptfs_write_tag_70_packet+0x11d4/0x1258 fs/ecryptfs/keystore.c:764 ecryptfs_encrypt_filename fs/ecryptfs/crypto.c:1487 [inline] ecryptfs_encrypt_and_encode_filename+0x378/0x103c fs/ecryptfs/crypto.c:1910 ecryptfs_lookup+0x1a0/0x6b4 fs/ecryptfs/inode.c:405 __lookup_slow+0x25c/0x38c fs/namei.c:1698 lookup_slow+0x60/0x84 fs/namei.c:1715 walk_component+0x278/0x374 fs/namei.c:2006 lookup_last fs/namei.c:2463 [inline] path_lookupat+0x168/0x3f0 fs/namei.c:2487 do_o_path+0xa4/0x1dc fs/namei.c:3809 path_openat+0x2290/0x27a0 fs/namei.c:3831 do_filp_open+0x198/0x38c fs/namei.c:3865 do_sys_openat2+0x134/0x3fc fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __arm64_sys_openat+0x11c/0x150 fs/open.c:1347 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x12c 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:589 Allocated by task 4573: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:53 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:384 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] assoc_array_insert_in_empty_tree lib/assoc_array.c:458 [inline] assoc_array_insert+0x300/0x257c lib/assoc_array.c:992 __key_link_begin+0xc4/0x1cc security/keys/keyring.c:1330 key_create_or_update+0x3d8/0x86c security/keys/key.c:886 __do_sys_add_key security/keys/keyctl.c:134 [inline] __se_sys_add_key security/keys/keyctl.c:74 [inline] __arm64_sys_add_key+0x40c/0x520 security/keys/keyctl.c:74 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x12c 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:589 The buggy address belongs to the object at ffff0000cd77f800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 152 bytes inside of 256-byte region [ffff0000cd77f800, ffff0000cd77f900) The buggy address belongs to the physical page: page:000000009cf6e2d0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10d77e head:000000009cf6e2d0 order:1 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c0002480 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cd77f780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cd77f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000cd77f880: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000cd77f900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cd77f980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================