================================================================== BUG: KASAN: slab-out-of-bounds in squashfs_get_id+0x1bc/0x1f0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/squashfs/id.c:38 Read of size 8 at addr ffff888060cf6b50 by task syz-executor.1/5615 CPU: 0 PID: 5615 Comm: syz-executor.1 Not tainted 5.11.0-rc6-next-20210205-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/mm/kasan/report.c:232 __kasan_report syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/mm/kasan/report.c:416 squashfs_get_id+0x1bc/0x1f0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/squashfs/id.c:38 squashfs_new_inode syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/squashfs/inode.c:51 [inline] squashfs_read_inode+0x1b4/0x1b40 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/squashfs/inode.c:120 squashfs_fill_super+0x1140/0x23b0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/squashfs/super.c:310 get_tree_bdev+0x440/0x760 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/super.c:1292 vfs_get_tree+0x89/0x2f0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/super.c:1497 do_new_mount syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/namespace.c:2903 [inline] path_mount+0x132a/0x1f90 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/namespace.c:3233 do_mount syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/namespace.c:3246 [inline] __do_sys_mount syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/namespace.c:3454 [inline] __se_sys_mount syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/namespace.c:3431 [inline] __x64_sys_mount+0x27f/0x300 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/fs/namespace.c:3431 do_syscall_64+0x2d/0x70 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x46702a Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd0a06c5fa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 000000000046702a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fd0a06c6000 RBP: 00007fd0a06c6040 R08: 00007fd0a06c6040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000 R13: 0000000020000100 R14: 00007fd0a06c6000 R15: 0000000020010300 Allocated by task 8: kasan_save_stack+0x1b/0x40 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/mm/kasan/common.c:38 kasan_set_track syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/mm/kasan/common.c:46 [inline] set_alloc_info syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/mm/kasan/common.c:403 [inline] ____kasan_kmalloc syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/mm/kasan/common.c:434 [inline] ____kasan_kmalloc.constprop.0+0xa0/0xd0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/mm/kasan/common.c:406 kmalloc syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/./include/linux/slab.h:561 [inline] kzalloc syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/./include/linux/slab.h:686 [inline] lsm_cred_alloc syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/security/security.c:534 [inline] security_prepare_creds+0x10e/0x190 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/security/security.c:1646 prepare_creds+0x509/0x730 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/cred.c:285 copy_creds+0x9f/0x770 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/cred.c:358 copy_process+0x11d0/0x6fd0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/fork.c:1973 kernel_clone+0xe7/0xab0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/fork.c:2462 kernel_thread+0xb5/0xf0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/fork.c:2514 call_usermodehelper_exec_work syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/umh.c:172 [inline] call_usermodehelper_exec_work+0xcc/0x180 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/umh.c:158 process_one_work+0x98d/0x15f0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/kernel/kthread.c:292 ret_from_fork+0x1f/0x30 syzkaller/managers/upstream-linux-next-kasan-gce-root/kernel/arch/x86/entry/entry_64.S:296 The buggy address belongs to the object at ffff888060cf6b40 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 8 bytes to the right of 8-byte region [ffff888060cf6b40, ffff888060cf6b48) The buggy address belongs to the page: page:000000003ff9c94e refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888060cf6b40 pfn:0x60cf6 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea0001411ec0 0000000400000004 ffff888010841280 raw: ffff888060cf6b40 0000000080660065 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888060cf6a00: fa fc fc fc fc fa fc fc fc fc fa fc fc fc fc fa ffff888060cf6a80: fc fc fc fc fa fc fc fc fc 00 fc fc fc fc 00 fc >ffff888060cf6b00: fc fc fc fb fc fc fc fc fb fc fc fc fc fa fc fc ^ ffff888060cf6b80: fc fc fb fc fc fc fc 00 fc fc fc fc fa fc fc fc ffff888060cf6c00: fc 00 fc fc fc fc fa fc fc fc fc fa fc fc fc fc ==================================================================