================================================================== BUG: KASAN: slab-out-of-bounds in squashfs_get_id+0x181/0x1a0 fs/squashfs/id.c:51 Read of size 8 at addr ffff88808f6b9d98 by task syz-executor.1/19478 CPU: 1 PID: 19478 Comm: syz-executor.1 Not tainted 4.14.198-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 squashfs_get_id+0x181/0x1a0 fs/squashfs/id.c:51 SQUASHFS error: zlib decompression failed, data probably corrupt squashfs_new_inode fs/squashfs/inode.c:64 [inline] squashfs_read_inode+0x171/0x1840 fs/squashfs/inode.c:133 SQUASHFS error: squashfs_read_data failed to read block 0x115 squashfs_fill_super+0x1138/0x1640 fs/squashfs/super.c:318 mount_bdev+0x2b3/0x360 fs/super.c:1134 mount_fs+0x92/0x2a0 fs/super.c:1237 SQUASHFS error: Unable to read metadata cache entry [115] vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0xe53/0x2a00 fs/namespace.c:2879 SQUASHFS error: Unable to read metadata cache entry [115] SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3072 SQUASHFS error: Unable to read directory block [115:26] do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x460bca RSP: 002b:00007fe4772fca88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fe4772fcb20 RCX: 0000000000460bca RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fe4772fcae0 RBP: 00007fe4772fcae0 R08: 00007fe4772fcb20 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020000240 SQUASHFS error: Unable to read directory block [115:26] Allocated by task 19478: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] squashfs_read_table+0x37/0x18d fs/squashfs/cache.c:426 squashfs_read_id_index_table+0x6f/0xc0 fs/squashfs/id.c:90 squashfs_fill_super+0xd7a/0x1640 fs/squashfs/super.c:246 mount_bdev+0x2b3/0x360 fs/super.c:1134 mount_fs+0x92/0x2a0 fs/super.c:1237 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0xe53/0x2a00 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3072 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 18662: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 single_release+0x85/0xb0 fs/seq_file.c:606 close_pdeo.part.0+0xdd/0x2c0 fs/proc/inode.c:165 close_pdeo fs/proc/inode.c:382 [inline] proc_reg_release+0x1fd/0x250 fs/proc/inode.c:376 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff88808f6b9d80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes inside of 32-byte region [ffff88808f6b9d80, ffff88808f6b9da0) The buggy address belongs to the page: page:ffffea00023dae40 count:1 mapcount:0 mapping:ffff88808f6b9000 index:0xffff88808f6b9fc1 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88808f6b9000 ffff88808f6b9fc1 000000010000003f raw: ffffea0002321e20 ffffea00021a2820 ffff88812fe501c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808f6b9c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88808f6b9d00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88808f6b9d80: 00 fc fc fc fc fc fc fc 00 00 01 fc fc fc fc fc ^ ffff88808f6b9e00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88808f6b9e80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================