================================================================== BUG: KASAN: slab-out-of-bounds in memcmp+0x16f/0x1c0 lib/string.c:770 Read of size 8 at addr ffff8880728c2690 by task syz-executor.1/4155 CPU: 0 PID: 4155 Comm: syz-executor.1 Not tainted 5.16.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 memcmp+0x16f/0x1c0 lib/string.c:770 memcmp include/linux/fortify-string.h:269 [inline] fscache_volume_same fs/fscache/volume.c:133 [inline] fscache_hash_volume fs/fscache/volume.c:171 [inline] __fscache_acquire_volume+0x655/0xed0 fs/fscache/volume.c:328 fscache_acquire_volume include/linux/fscache.h:201 [inline] v9fs_cache_session_get_cookie+0xf4/0x1d0 fs/9p/cache.c:34 v9fs_session_init+0xe46/0x1450 fs/9p/v9fs.c:473 v9fs_mount+0x69/0x8f0 fs/9p/vfs_super.c:125 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1500 do_new_mount fs/namespace.c:2988 [inline] path_mount+0x7e8/0x1a40 fs/namespace.c:3318 do_mount fs/namespace.c:3331 [inline] __do_sys_mount fs/namespace.c:3539 [inline] __se_sys_mount fs/namespace.c:3516 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3516 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f0527904279 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0527079168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f0527a16f80 RCX: 00007f0527904279 RDX: 0000000020000040 RSI: 0000000020000000 RDI: 0000000000000000 RBP: 00007f052795e189 R08: 0000000020000200 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe698fa90f R14: 00007f0527079300 R15: 0000000000022000 Allocated by task 4155: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:595 [inline] kzalloc include/linux/slab.h:724 [inline] fscache_alloc_volume fs/fscache/volume.c:234 [inline] __fscache_acquire_volume+0x257/0xed0 fs/fscache/volume.c:323 fscache_acquire_volume include/linux/fscache.h:201 [inline] v9fs_cache_session_get_cookie+0xf4/0x1d0 fs/9p/cache.c:34 v9fs_session_init+0xe46/0x1450 fs/9p/v9fs.c:473 v9fs_mount+0x69/0x8f0 fs/9p/vfs_super.c:125 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1500 do_new_mount fs/namespace.c:2988 [inline] path_mount+0x7e8/0x1a40 fs/namespace.c:3318 do_mount fs/namespace.c:3331 [inline] __do_sys_mount fs/namespace.c:3539 [inline] __se_sys_mount fs/namespace.c:3516 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3516 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff8880728c2600 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 144 bytes inside of 192-byte region [ffff8880728c2600, ffff8880728c26c0) The buggy address belongs to the page: page:ffffea0001ca3080 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x728c2 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888010441a00 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 3962, ts 59188980659, free_ts 59142090719 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa6f/0x2f10 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_slab_page mm/slub.c:1795 [inline] allocate_slab mm/slub.c:1930 [inline] new_slab+0xab/0x4a0 mm/slub.c:1993 ___slab_alloc+0x91a/0xfd0 mm/slub.c:3022 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109 slab_alloc_node mm/slub.c:3200 [inline] __kmalloc_node+0x2cb/0x390 mm/slub.c:4467 kmalloc_array_node include/linux/slab.h:686 [inline] kcalloc_node include/linux/slab.h:691 [inline] memcg_alloc_page_obj_cgroups+0x8b/0x140 mm/memcontrol.c:2827 memcg_slab_post_alloc_hook+0x90/0x430 mm/slab.h:313 slab_post_alloc_hook mm/slab.h:526 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc+0x15c/0x3a0 mm/slub.c:3247 kmem_cache_zalloc include/linux/slab.h:714 [inline] alloc_buffer_head+0x17/0x110 fs/buffer.c:3309 alloc_page_buffers+0x1e6/0x4d0 fs/buffer.c:832 grow_dev_page fs/buffer.c:968 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow+0x354/0x830 fs/buffer.c:1041 sb_getblk include/linux/buffer_head.h:327 [inline] ext4_getblk+0x1a0/0x580 fs/ext4/inode.c:854 ext4_bread+0x8/0x120 fs/ext4/inode.c:900 ext4_append+0x139/0x310 fs/ext4/namei.c:67 ext4_init_new_dir+0x2e4/0x500 fs/ext4/namei.c:2893 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3388 __unfreeze_partials+0x343/0x360 mm/slub.c:2527 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc+0x202/0x3a0 mm/slub.c:3247 getname_flags.part.0+0x4a/0x440 fs/namei.c:138 do_sys_openat2+0xd2/0x400 fs/open.c:1206 do_sys_open fs/open.c:1228 [inline] __do_sys_openat fs/open.c:1244 [inline] __se_sys_openat fs/open.c:1239 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1239 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff8880728c2580: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8880728c2600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880728c2680: 00 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880728c2700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880728c2780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================