================================================================== BUG: KASAN: slab-out-of-bounds in squashfs_get_id+0x1ae/0x1d0 fs/squashfs/id.c:38 Read of size 8 at addr ffff88800f9a19a8 by task syz-executor.2/1087 CPU: 1 PID: 1087 Comm: syz-executor.2 Not tainted 5.9.0-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+0x198/0x1fb lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 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:51 [inline] squashfs_read_inode+0x197/0x1940 fs/squashfs/inode.c:120 squashfs_fill_super+0x1079/0x1ed0 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+0x1387/0x20a0 fs/namespace.c:3203 do_mount fs/namespace.c:3216 [inline] __do_sys_mount fs/namespace.c:3424 [inline] __se_sys_mount fs/namespace.c:3401 [inline] __ia32_sys_mount+0x27e/0x300 fs/namespace.c:3401 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:0xf7f61549 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:00000000f555af00 EFLAGS: 00000292 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00000000f555af70 RCX: 0000000020000100 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 00000000f555afb0 RBP: 00000000f555afb0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1087: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 __do_kmalloc mm/slab.c:3657 [inline] __kmalloc+0x27b/0x4d0 mm/slab.c:3666 kmalloc include/linux/slab.h:559 [inline] squashfs_read_table+0x43/0x1e0 fs/squashfs/cache.c:413 squashfs_read_id_index_table+0x83/0xf0 fs/squashfs/id.c:77 squashfs_fill_super+0xce9/0x1ed0 fs/squashfs/super.c:238 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+0x1387/0x20a0 fs/namespace.c:3203 do_mount fs/namespace.c:3216 [inline] __do_sys_mount fs/namespace.c:3424 [inline] __se_sys_mount fs/namespace.c:3401 [inline] __ia32_sys_mount+0x27e/0x300 fs/namespace.c:3401 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 Last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0x82/0xb0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2953 [inline] call_rcu+0x15e/0x7d0 kernel/rcu/tree.c:3027 memcg_update_list_lru_node mm/list_lru.c:422 [inline] memcg_update_list_lru mm/list_lru.c:481 [inline] memcg_update_all_list_lrus+0x22b/0x630 mm/list_lru.c:518 memcg_alloc_cache_id mm/memcontrol.c:3016 [inline] memcg_online_kmem mm/memcontrol.c:3696 [inline] mem_cgroup_css_alloc+0xe9e/0x1a50 mm/memcontrol.c:5368 css_create kernel/cgroup/cgroup.c:5130 [inline] cgroup_apply_control_enable+0x489/0xc70 kernel/cgroup/cgroup.c:3058 cgroup_mkdir+0x8b6/0x1130 kernel/cgroup/cgroup.c:5360 kernfs_iop_mkdir+0x146/0x1d0 fs/kernfs/dir.c:1127 vfs_mkdir+0x507/0x770 fs/namei.c:3649 do_mkdirat+0x262/0x2d0 fs/namei.c:3672 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 ffff88800f9a1980 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 8 bytes to the right of 32-byte region [ffff88800f9a1980, ffff88800f9a19a0) The buggy address belongs to the page: page:00000000f0b3ef76 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88800f9a1fc1 pfn:0xf9a1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00004810c8 ffffea00004c75c8 ffff88800ec40100 raw: ffff88800f9a1fc1 ffff88800f9a1000 000000010000003f ffff888017c8dc01 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888017c8dc01 Memory state around the buggy address: ffff88800f9a1880: 00 00 02 fc fc fc fc fc 00 fc fc fc fc fc fc fc ffff88800f9a1900: 00 00 00 fc fc fc fc fc 00 00 fc fc fc fc fc fc >ffff88800f9a1980: 00 fc fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ^ ffff88800f9a1a00: 00 01 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ffff88800f9a1a80: 00 01 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ==================================================================