SQUASHFS error: Unable to read metadata cache entry [0] overlayfs: failed to resolve './file1': -2 SQUASHFS error: Unable to read inode 0xa6 SQUASHFS error: Unable to read inode 0xa6 ================================================================== BUG: KASAN: slab-out-of-bounds in squashfs_get_id+0x181/0x1a0 fs/squashfs/id.c:51 Read of size 8 at addr ffff8880a5c73ba0 by task syz-executor.3/31057 CPU: 1 PID: 31057 Comm: syz-executor.3 Not tainted 4.14.209-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_new_inode fs/squashfs/inode.c:64 [inline] squashfs_read_inode+0x185/0x19e0 fs/squashfs/inode.c:133 SQUASHFS error: Unable to read metadata cache entry [0] squashfs_fill_super+0x1501/0x1aa0 fs/squashfs/super.c:318 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 SQUASHFS error: Unable to read inode 0xa6 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x46090a RSP: 002b:00007fac73fcea88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fac73fceb20 RCX: 000000000046090a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fac73fceae0 RBP: 00007fac73fceae0 R08: 00007fac73fceb20 R09: 0000000020000000 R10: 0000000000000004 R11: 0000000000000202 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020000380 SQUASHFS error: Unable to read metadata cache entry [0] Allocated by task 31057: 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+0x97/0xe0 fs/squashfs/id.c:90 squashfs_fill_super+0xc2c/0x1aa0 fs/squashfs/super.c:246 mount_bdev+0x2b3/0x360 fs/super.c:1134 SQUASHFS error: Unable to read inode 0xa6 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 8008: 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 kvfree+0x45/0x50 mm/util.c:416 __vunmap+0x20f/0x300 mm/vmalloc.c:1548 vfree+0x4b/0xd0 mm/vmalloc.c:1612 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:867 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1025 [inline] do_ipt_get_ctl+0x5c7/0x7a0 net/ipv4/netfilter/ip_tables.c:1702 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x62/0xc0 net/netfilter/nf_sockopt.c:122 ip_getsockopt net/ipv4/ip_sockglue.c:1566 [inline] ip_getsockopt+0x105/0x150 net/ipv4/ip_sockglue.c:1551 tcp_getsockopt+0x7b/0xc0 net/ipv4/tcp.c:3257 SYSC_getsockopt net/socket.c:1896 [inline] SyS_getsockopt+0x102/0x1c0 net/socket.c:1878 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880a5c73b80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes to the right of 32-byte region [ffff8880a5c73b80, ffff8880a5c73ba0) The buggy address belongs to the page: page:ffffea0002971cc0 count:1 mapcount:0 mapping:ffff8880a5c73000 index:0xffff8880a5c73fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880a5c73000 ffff8880a5c73fc1 000000010000002c raw: ffffea00029fb8e0 ffffea0002c660e0 ffff88813fe821c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a5c73a80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a5c73b00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a5c73b80: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8880a5c73c00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a5c73c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================