================================================================== BUG: KASAN: use-after-free in squashfs_get_id+0x1ae/0x1d0 fs/squashfs/id.c:38 Read of size 8 at addr ffff888041d926b8 by task syz-executor.2/4248 CPU: 0 PID: 4248 Comm: syz-executor.2 Not tainted 5.10.0-rc2-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 squashfs_get_id+0x1ae/0x1d0 fs/squashfs/id.c:38 squashfs_new_inode fs/squashfs/inode.c:55 [inline] squashfs_read_inode+0x1ee/0x1b40 fs/squashfs/inode.c:120 squashfs_fill_super+0x1140/0x23b0 fs/squashfs/super.c:310 get_tree_bdev+0x421/0x740 fs/super.c:1344 vfs_get_tree+0x89/0x2f0 fs/super.c:1549 do_new_mount fs/namespace.c:2875 [inline] path_mount+0x13ad/0x20c0 fs/namespace.c:3205 do_mount fs/namespace.c:3218 [inline] __do_sys_mount fs/namespace.c:3426 [inline] __se_sys_mount fs/namespace.c:3403 [inline] __ia32_sys_mount+0x27e/0x300 fs/namespace.c:3403 do_syscall_32_irqs_on arch/x86/entry/common.c:78 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:137 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:160 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf7f35549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f552ef00 EFLAGS: 00000292 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00000000f552ef70 RCX: 0000000020000100 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 00000000f552efb0 RBP: 00000000f552efb0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 9047: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc_node include/linux/slab.h:575 [inline] __vmalloc_area_node+0x59b/0x7b0 mm/vmalloc.c:2476 __vmalloc_node_range mm/vmalloc.c:2558 [inline] __vmalloc_node mm/vmalloc.c:2601 [inline] vmalloc+0x116/0x1a0 mm/vmalloc.c:2634 xt_compat_init_offsets+0xdf/0x220 net/netfilter/x_tables.c:711 compat_table_info+0xb7/0x5b0 net/ipv4/netfilter/ip_tables.c:935 get_info+0x282/0x740 net/ipv6/netfilter/ip6_tables.c:988 do_ipt_get_ctl+0x152/0x9d0 net/ipv4/netfilter/ip_tables.c:1651 nf_getsockopt+0x72/0xd0 net/netfilter/nf_sockopt.c:116 ip_getsockopt net/ipv4/ip_sockglue.c:1777 [inline] ip_getsockopt+0x164/0x1c0 net/ipv4/ip_sockglue.c:1756 tcp_getsockopt+0x86/0xd0 net/ipv4/tcp.c:3882 __sys_getsockopt+0x219/0x4c0 net/socket.c:2173 __do_compat_sys_socketcall+0x513/0x660 net/compat.c:495 do_syscall_32_irqs_on arch/x86/entry/common.c:78 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:137 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:160 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c The buggy address belongs to the object at ffff888041d926b8 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of 8-byte region [ffff888041d926b8, ffff888041d926c0) The buggy address belongs to the page: page:00000000181f07b2 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888041d92c58 pfn:0x41d92 flags: 0x4fff00000000200(slab) raw: 04fff00000000200 ffffea00004c0e00 0000000300000003 ffff888010043cc0 raw: ffff888041d92c58 000000008066005e 00000001ffffffff ffff88805c620001 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88805c620001 Memory state around the buggy address: ffff888041d92580: fc fc fc fc fb fc fc fc fc fb fc fc fc fc fa fc ffff888041d92600: fc fc fc 00 fc fc fc fc fa fc fc fc fc 00 fc fc >ffff888041d92680: fc fc 00 fc fc fc fc fb fc fc fc fc fb fc fc fc ^ ffff888041d92700: fc 00 fc fc fc fc fb fc fc fc fc 00 fc fc fc fc ffff888041d92780: 00 fc fc fc fc fa fc fc fc fc fb fc fc fc fc 00 ==================================================================