================================================================== BUG: KASAN: slab-out-of-bounds in squashfs_get_id+0x181/0x1a0 fs/squashfs/id.c:51 Read of size 8 at addr ffff8880a443c1f8 by task syz-executor.2/18601 CPU: 0 PID: 18601 Comm: syz-executor.2 Not tainted 4.14.211-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_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 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x460b4a RSP: 002b:00007f1b7e149a78 EFLAGS: 00000212 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f1b7e149b10 RCX: 0000000000460b4a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f1b7e149ad0 RBP: 00007f1b7e149ad0 R08: 00007f1b7e149b10 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000212 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020000040 Allocated by task 8010: 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_node mm/slab.c:3682 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] __vmalloc_area_node+0x510/0x680 mm/vmalloc.c:1691 __vmalloc_node_range mm/vmalloc.c:1767 [inline] __vmalloc_node mm/vmalloc.c:1818 [inline] __vmalloc_node_flags mm/vmalloc.c:1832 [inline] vzalloc+0xc3/0x150 mm/vmalloc.c:1871 xt_counters_alloc+0x30/0x50 net/netfilter/x_tables.c:1216 __do_replace+0x79/0x580 net/ipv6/netfilter/ip6_tables.c:1069 do_replace net/ipv6/netfilter/ip6_tables.c:1161 [inline] do_ip6t_set_ctl+0x256/0x3a4 net/ipv6/netfilter/ip6_tables.c:1685 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x5f/0xb0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0xc0/0x120 net/ipv6/ipv6_sockglue.c:937 tcp_setsockopt+0x7b/0xc0 net/ipv4/tcp.c:2828 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x110/0x1e0 net/socket.c:1844 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 8010: 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 __do_replace+0x431/0x580 net/ipv6/netfilter/ip6_tables.c:1113 do_replace net/ipv6/netfilter/ip6_tables.c:1161 [inline] do_ip6t_set_ctl+0x256/0x3a4 net/ipv6/netfilter/ip6_tables.c:1685 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x5f/0xb0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0xc0/0x120 net/ipv6/ipv6_sockglue.c:937 tcp_setsockopt+0x7b/0xc0 net/ipv4/tcp.c:2828 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x110/0x1e0 net/socket.c:1844 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 ffff8880a443c1c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes to the right of 32-byte region [ffff8880a443c1c0, ffff8880a443c1e0) The buggy address belongs to the page: page:ffffea0002910f00 count:1 mapcount:0 mapping:ffff8880a443c000 index:0xffff8880a443cfc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880a443c000 ffff8880a443cfc1 0000000100000027 raw: ffffea0002740120 ffffea0002bf94e0 ffff88813fe801c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a443c080: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a443c100: fb fb fb fb fc fc fc fc 04 fc fc fc fc fc fc fc >ffff8880a443c180: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8880a443c200: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a443c280: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================