================================================================== BUG: KASAN: slab-out-of-bounds in squashfs_inode_lookup fs/squashfs/export.c:57 [inline] BUG: KASAN: slab-out-of-bounds in squashfs_export_iget+0x274/0x2a0 fs/squashfs/export.c:82 Read of size 8 at addr ffff88809f047ab8 by task syz-executor147/8106 CPU: 1 PID: 8106 Comm: syz-executor147 Not tainted 4.19.160-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+0x1fc/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 squashfs_inode_lookup fs/squashfs/export.c:57 [inline] squashfs_export_iget+0x274/0x2a0 fs/squashfs/export.c:82 squashfs_fh_to_dentry fs/squashfs/export.c:97 [inline] squashfs_fh_to_dentry+0x78/0xb0 fs/squashfs/export.c:90 exportfs_decode_fh+0x126/0x7d8 fs/exportfs/expfs.c:433 do_handle_to_path fs/fhandle.c:152 [inline] handle_to_path fs/fhandle.c:207 [inline] do_handle_open+0x2f4/0x650 fs/fhandle.c:223 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4443e9 Code: 8d d7 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 5b d7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffd7b091d38 EFLAGS: 00000246 ORIG_RAX: 0000000000000130 RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004443e9 RDX: 0000000000490400 RSI: 0000000020000100 RDI: 0000000000000005 RBP: 00000000006cf018 R08: 00007ffd00000015 R09: 00000000004002e0 R10: 00007ffd7b091be0 R11: 0000000000000246 R12: 0000000000401fd0 R13: 0000000000402060 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc_track_caller+0x155/0x3c0 mm/slab.c:3742 kstrdup+0x36/0x70 mm/util.c:56 kstrdup_const+0x53/0x80 mm/util.c:77 __kernfs_new_node+0x9b/0x680 fs/kernfs/dir.c:629 kernfs_new_node+0x92/0x120 fs/kernfs/dir.c:693 __kernfs_create_file+0x51/0x33f fs/kernfs/file.c:992 cgroup_add_file kernel/cgroup/cgroup.c:3578 [inline] cgroup_addrm_files+0x399/0x980 kernel/cgroup/cgroup.c:3637 css_populate_dir+0x19b/0x450 kernel/cgroup/cgroup.c:1628 cgroup_apply_control_enable+0x3dd/0xc60 kernel/cgroup/cgroup.c:2955 cgroup_mkdir+0x7d9/0x1090 kernel/cgroup/cgroup.c:5052 kernfs_iop_mkdir+0x146/0x1d0 fs/kernfs/dir.c:1120 vfs_mkdir+0x508/0x7a0 fs/namei.c:3819 do_mkdirat+0x262/0x2d0 fs/namei.c:3842 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6243: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 single_release+0x8c/0xb0 fs/seq_file.c:597 close_pdeo.part.0+0xda/0x2f0 fs/proc/inode.c:176 close_pdeo fs/proc/inode.c:401 [inline] proc_reg_release+0x21e/0x270 fs/proc/inode.c:395 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809f047a80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes to the right of 32-byte region [ffff88809f047a80, ffff88809f047aa0) The buggy address belongs to the page: page:ffffea00027c11c0 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff88809f047fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea000288bb08 ffffea000284b6c8 ffff88813bff01c0 raw: ffff88809f047fc1 ffff88809f047000 0000000100000026 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809f047980: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809f047a00: 00 00 02 fc fc fc fc fc 00 01 fc fc fc fc fc fc >ffff88809f047a80: 00 05 fc fc fc fc fc fc 00 fc fc fc fc fc fc fc ^ ffff88809f047b00: fb fb fb fb fc fc fc fc 00 07 fc fc fc fc fc fc ffff88809f047b80: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc ==================================================================