RDX: 0000000020000380 RSI: 0000000020000c80 RDI: 0000000000000000 RBP: 0000000000930140 R08: 0000000020000cc0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000008 R13: 00000000004d2768 R14: 00000000004c7be5 R15: 0000000000000024 ================================================================== BUG: KASAN: double-free or invalid-free in fscache_free_cookie+0x230/0x280 fs/fscache/cookie.c:67 CPU: 0 PID: 7089 Comm: syz-executor6 Not tainted 4.18.0+ #192 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+0x1c9/0x2b4 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_invalid_free+0x64/0xa0 mm/kasan/report.c:336 __kasan_slab_free+0x150/0x170 mm/kasan/kasan.c:501 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 fscache_free_cookie+0x230/0x280 fs/fscache/cookie.c:67 fscache_alloc_cookie+0x74c/0x880 fs/fscache/cookie.c:202 __fscache_acquire_cookie+0x230/0xb00 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+0x1013/0x1a80 fs/9p/v9fs.c:464 v9fs_mount+0x7c/0x900 fs/9p/vfs_super.c:135 mount_fs+0xae/0x328 fs/super.c:1277 vfs_kern_mount.part.34+0xdc/0x4e0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2542 [inline] do_mount+0x581/0x30e0 fs/namespace.c:2872 ksys_mount+0x12d/0x140 fs/namespace.c:3088 __do_sys_mount fs/namespace.c:3102 [inline] __se_sys_mount fs/namespace.c:3099 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3099 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457089 Code: fd b4 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 b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1288e5bc78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f1288e5c6d4 RCX: 0000000000457089 RDX: 0000000020000380 RSI: 0000000020000c80 RDI: 0000000000000000 RBP: 0000000000930140 R08: 0000000020000cc0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000008 R13: 00000000004d2768 R14: 00000000004c7be5 R15: 0000000000000024 Allocated by task 30193: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_node_trace+0x150/0x770 mm/slab.c:3663 kmalloc_node include/linux/slab.h:551 [inline] kzalloc_node include/linux/slab.h:718 [inline] __get_vm_area_node+0x12d/0x390 mm/vmalloc.c:1389 __vmalloc_node_range+0xc4/0x760 mm/vmalloc.c:1741 __vmalloc_node mm/vmalloc.c:1791 [inline] __vmalloc_node_flags mm/vmalloc.c:1805 [inline] vzalloc+0x6f/0x80 mm/vmalloc.c:1844 alloc_counters.isra.11+0xb7/0x840 net/ipv6/netfilter/ip6_tables.c:819 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:841 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0x7e3/0xc30 net/ipv6/netfilter/ip6_tables.c:1712 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x80/0xe0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x1f0/0x320 net/ipv6/ipv6_sockglue.c:1381 tcp_getsockopt+0x93/0xe0 net/ipv4/tcp.c:3583 sock_common_getsockopt+0x9a/0xe0 net/core/sock.c:2997 __sys_getsockopt+0x1ad/0x390 net/socket.c:1937 __do_sys_getsockopt net/socket.c:1948 [inline] __se_sys_getsockopt net/socket.c:1945 [inline] __x64_sys_getsockopt+0xbe/0x150 net/socket.c:1945 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 30193: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 __vunmap+0x333/0x460 mm/vmalloc.c:1532 vfree+0x68/0x100 mm/vmalloc.c:1593 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:886 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0xa52/0xc30 net/ipv6/netfilter/ip6_tables.c:1712 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x80/0xe0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x1f0/0x320 net/ipv6/ipv6_sockglue.c:1381 tcp_getsockopt+0x93/0xe0 net/ipv4/tcp.c:3583 sock_common_getsockopt+0x9a/0xe0 net/core/sock.c:2997 __sys_getsockopt+0x1ad/0x390 net/socket.c:1937 __do_sys_getsockopt net/socket.c:1948 [inline] __se_sys_getsockopt net/socket.c:1945 [inline] __x64_sys_getsockopt+0xbe/0x150 net/socket.c:1945 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801c2276c00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8801c2276c00, ffff8801c2276c40) The buggy address belongs to the page: page:ffffea0007089d80 count:1 mapcount:0 mapping:ffff8801dac00340 index:0xffff8801c2276880 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea000713b008 ffffea00075f7f88 ffff8801dac00340 raw: ffff8801c2276880 ffff8801c2276000 000000010000001f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c2276b00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801c2276b80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801c2276c00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8801c2276c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801c2276d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================