================================================================== BUG: KASAN: slab-out-of-bounds in fscache_set_key fs/fscache/cookie.c:120 [inline] BUG: KASAN: slab-out-of-bounds in fscache_alloc_cookie+0x745/0x800 fs/fscache/cookie.c:171 Read of size 4 at addr ffff8801c3bb0858 by task syz-executor4/12475 CPU: 0 PID: 12475 Comm: syz-executor4 Not tainted 4.19.0-rc8-next-20181016+ #95 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 fscache_set_key fs/fscache/cookie.c:120 [inline] fscache_alloc_cookie+0x745/0x800 fs/fscache/cookie.c:171 __fscache_acquire_cookie+0x230/0xb60 fs/fscache/cookie.c:303 fscache_acquire_cookie include/linux/fscache.h:338 [inline] v9fs_cache_session_get_cookie+0xc4/0x270 fs/9p/cache.c:73 v9fs_session_init+0x10e4/0x1bb0 fs/9p/v9fs.c:485 v9fs_mount+0x7c/0x8f0 fs/9p/vfs_super.c:135 legacy_get_tree+0x131/0x460 fs/fs_context.c:718 vfs_get_tree+0x1cb/0x5c0 fs/super.c:1795 do_new_mount fs/namespace.c:2648 [inline] do_mount+0x70c/0x1d90 fs/namespace.c:2974 ksys_mount+0x12d/0x140 fs/namespace.c:3190 __do_sys_mount fs/namespace.c:3204 [inline] __se_sys_mount fs/namespace.c:3201 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3201 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457569 Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fae921d8c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000457569 RDX: 0000000020000040 RSI: 0000000020000000 RDI: 0000000000000000 RBP: 000000000072bf00 R08: 0000000020000080 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fae921d96d4 R13: 00000000004c28a1 R14: 00000000004d3c90 R15: 00000000ffffffff Allocated by task 12475: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3722 [inline] __kmalloc+0x15b/0x760 mm/slab.c:3731 kmalloc include/linux/slab.h:551 [inline] kzalloc include/linux/slab.h:741 [inline] fscache_set_key fs/fscache/cookie.c:101 [inline] fscache_alloc_cookie+0x68f/0x800 fs/fscache/cookie.c:171 __fscache_acquire_cookie+0x230/0xb60 fs/fscache/cookie.c:303 fscache_acquire_cookie include/linux/fscache.h:338 [inline] v9fs_cache_session_get_cookie+0xc4/0x270 fs/9p/cache.c:73 v9fs_session_init+0x10e4/0x1bb0 fs/9p/v9fs.c:485 v9fs_mount+0x7c/0x8f0 fs/9p/vfs_super.c:135 legacy_get_tree+0x131/0x460 fs/fs_context.c:718 vfs_get_tree+0x1cb/0x5c0 fs/super.c:1795 do_new_mount fs/namespace.c:2648 [inline] do_mount+0x70c/0x1d90 fs/namespace.c:2974 ksys_mount+0x12d/0x140 fs/namespace.c:3190 __do_sys_mount fs/namespace.c:3204 [inline] __se_sys_mount fs/namespace.c:3201 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3201 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 11294: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 __memcg_destroy_list_lru_node mm/list_lru.c:347 [inline] memcg_destroy_list_lru_node.isra.7+0xaf/0x100 mm/list_lru.c:398 memcg_destroy_list_lru mm/list_lru.c:486 [inline] list_lru_destroy+0x2ac/0x500 mm/list_lru.c:658 deactivate_locked_super+0xa3/0x100 fs/super.c:335 deactivate_super+0x2bb/0x320 fs/super.c:359 cleanup_mnt+0xbf/0x160 fs/namespace.c:1049 mntput_no_expire+0x897/0xc00 fs/namespace.c:1128 mntput fs/namespace.c:1138 [inline] kern_unmount+0xbd/0xf0 fs/namespace.c:3132 mq_put_mnt+0x37/0x41 ipc/mqueue.c:1621 put_ipc_ns+0x5e/0x180 ipc/namespace.c:151 free_nsproxy+0xcf/0x220 kernel/nsproxy.c:180 switch_task_namespaces+0xb3/0xd0 kernel/nsproxy.c:229 exit_task_namespaces+0x17/0x20 kernel/nsproxy.c:234 do_exit+0xf7c/0x26d0 kernel/exit.c:866 do_group_exit+0x177/0x440 kernel/exit.c:970 get_signal+0x8a8/0x1970 kernel/signal.c:2517 do_signal+0x9c/0x21c0 arch/x86/kernel/signal.c:816 exit_to_usermode_loop+0x2e5/0x380 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801c3bb0840 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes inside of 32-byte region [ffff8801c3bb0840, ffff8801c3bb0860) The buggy address belongs to the page: page:ffffea00070eec00 count:1 mapcount:0 mapping:ffff8801da8001c0 index:0xffff8801c3bb0fc1 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea000721ff48 ffffea00062f2088 ffff8801da8001c0 raw: ffff8801c3bb0fc1 ffff8801c3bb0000 000000010000003e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c3bb0700: 06 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8801c3bb0780: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8801c3bb0800: 00 04 fc fc fc fc fc fc 00 00 00 01 fc fc fc fc ^ ffff8801c3bb0880: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801c3bb0900: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================