================================================================== BUG: KASAN: use-after-free in erspan_xmit+0x22d4/0x2430 net/ipv4/ip_gre.c:735 Read of size 2 at addr ffff8801ce48e7cb by task syz-executor1/25288 CPU: 0 PID: 25288 Comm: syz-executor1 Not tainted 4.15.0-rc8+ #205 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:440 erspan_xmit+0x22d4/0x2430 net/ipv4/ip_gre.c:735 __netdev_start_xmit include/linux/netdevice.h:4055 [inline] netdev_start_xmit include/linux/netdevice.h:4064 [inline] packet_direct_xmit+0x3ad/0x790 net/packet/af_packet.c:267 packet_snd net/packet/af_packet.c:2944 [inline] packet_sendmsg+0x3aed/0x60b0 net/packet/af_packet.c:2969 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1721 Dead loop on virtual device ip6_vti0, fix it urgently! Dead loop on virtual device ip6_vti0, fix it urgently! SyS_sendto+0x40/0x50 net/socket.c:1689 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x452f19 RSP: 002b:00007ff287f7ac58 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000071bf58 RCX: 0000000000452f19 RDX: 0000000000000000 RSI: 0000000020015f41 RDI: 0000000000000016 RBP: 00000000000000b7 R08: 0000000020015fec R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f01c8 R13: 00000000ffffffff R14: 00007ff287f7b6d4 R15: 0000000000000006 Allocated by task 24120: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3544 kmem_cache_zalloc include/linux/slab.h:678 [inline] file_alloc_security security/selinux/hooks.c:369 [inline] selinux_file_alloc_security+0xae/0x190 security/selinux/hooks.c:3454 security_file_alloc+0x6d/0xa0 security/security.c:873 get_empty_filp+0x189/0x4f0 fs/file_table.c:129 alloc_file+0x26/0x390 fs/file_table.c:164 sock_alloc_file+0x1f3/0x560 net/socket.c:411 sock_map_fd+0x34/0x90 net/socket.c:438 SYSC_socket net/socket.c:1333 [inline] SyS_socket+0x125/0x1d0 net/socket.c:1309 entry_SYSCALL_64_fastpath+0x29/0xa0 Freed by task 24132: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3488 [inline] kmem_cache_free+0x83/0x2a0 mm/slab.c:3746 file_free_security security/selinux/hooks.c:384 [inline] selinux_file_free_security+0x49/0x60 security/selinux/hooks.c:3459 security_file_free+0x48/0x80 security/security.c:878 __fput+0x334/0x7e0 fs/file_table.c:211 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ad0 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x73f/0x16c0 kernel/signal.c:2335 do_signal+0x90/0x1eb0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x214/0x310 arch/x86/entry/common.c:158 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x9e/0xa0 The buggy address belongs to the object at ffff8801ce48e7c0 which belongs to the cache selinux_file_security of size 16 The buggy address is located 11 bytes inside of 16-byte region [ffff8801ce48e7c0, ffff8801ce48e7d0) The buggy address belongs to the page: page:ffffea0007392380 count:1 mapcount:0 mapping:ffff8801ce48e000 index:0xffff8801ce48ef84 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801ce48e000 ffff8801ce48ef84 000000010000007c raw: ffffea0006f5b0a0 ffffea00073c8f20 ffff8801dae270c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801ce48e680: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff8801ce48e700: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc >ffff8801ce48e780: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ^ ffff8801ce48e800: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff8801ce48e880: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ==================================================================