================================================================== BUG: KASAN: slab-out-of-bounds in ovl_check_fb_len+0xf7/0x130 fs/overlayfs/namei.c:89 Read of size 1 at addr ffff888093cb788d by task syz-executor.1/10766 CPU: 0 PID: 10766 Comm: syz-executor.1 Not tainted 5.4.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x128/0x182 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x317 mm/kasan/report.c:374 __kasan_report.cold.11+0x1c/0x37 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:634 ovl_check_fb_len+0xf7/0x130 fs/overlayfs/namei.c:89 ovl_check_fh_len fs/overlayfs/overlayfs.h:325 [inline] ovl_fh_to_dentry+0x199/0x777 fs/overlayfs/export.c:805 exportfs_decode_fh+0xfe/0x66d fs/exportfs/expfs.c:434 do_handle_to_path fs/fhandle.c:152 [inline] handle_to_path fs/fhandle.c:207 [inline] do_handle_open+0x244/0x580 fs/fhandle.c:223 do_syscall_64+0xc6/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45ca29 Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe8165f5c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000130 RAX: ffffffffffffffda RBX: 00000000004f6d00 RCX: 000000000045ca29 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000077b R14: 00000000004ca4e6 R15: 00007fe8165f66d4 Allocated by task 10766: save_stack+0x19/0x80 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc.constprop.13+0xc1/0xd0 mm/kasan/common.c:510 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc+0x164/0x7b0 mm/slab.c:3664 kmalloc include/linux/slab.h:561 [inline] handle_to_path fs/fhandle.c:192 [inline] do_handle_open+0xc1/0x580 fs/fhandle.c:223 do_syscall_64+0xc6/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10439: save_stack+0x19/0x80 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:471 __cache_free mm/slab.c:3425 [inline] kfree+0x107/0x2b0 mm/slab.c:3756 tomoyo_mount_acl+0x40a/0x7b0 security/tomoyo/mount.c:173 tomoyo_mount_permission+0x115/0x2d0 security/tomoyo/mount.c:237 security_sb_mount+0x58/0xa0 security/security.c:860 do_mount+0x16a/0x1720 fs/namespace.c:3084 ksys_mount+0xb5/0xd0 fs/namespace.c:3351 __do_sys_mount fs/namespace.c:3365 [inline] __se_sys_mount fs/namespace.c:3362 [inline] __x64_sys_mount+0xb5/0x150 fs/namespace.c:3362 do_syscall_64+0xc6/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888093cb7880 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 13 bytes inside of 32-byte region [ffff888093cb7880, ffff888093cb78a0) The buggy address belongs to the page: page:ffffea00024f2dc0 refcount:1 mapcount:0 mapping:ffff8880aa0001c0 index:0xffff888093cb7fc1 raw: 00fffe0000000200 ffffea0002645ac8 ffffea0002520588 ffff8880aa0001c0 raw: ffff888093cb7fc1 ffff888093cb7000 000000010000003d 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888093cb7780: 06 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff888093cb7800: fb fb fb fb fc fc fc fc 00 00 00 05 fc fc fc fc >ffff888093cb7880: 00 02 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff888093cb7900: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff888093cb7980: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================