audit: type=1400 audit(1516634017.359:10): avc: denied { sys_chroot } for pid=3660 comm="syzkaller653656" capability=18 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 ================================================================== BUG: KASAN: use-after-free in erspan_xmit+0x22d4/0x2430 net/ipv4/ip_gre.c:735 Read of size 2 at addr ffff8801d67715cb by task syzkaller653656/3660 CPU: 0 PID: 3660 Comm: syzkaller653656 Not tainted 4.15.0-rc8+ #203 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:4053 [inline] netdev_start_xmit include/linux/netdevice.h:4062 [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 SyS_sendto+0x40/0x50 net/socket.c:1689 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x4458d9 RSP: 002b:00000000007efdf8 EFLAGS: 00000217 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000004a78dd RCX: 00000000004458d9 RDX: 0000000000000000 RSI: 0000000020003fd9 RDI: 0000000000000004 RBP: 0000000000000068 R08: 0000000020008000 R09: 000000000000001c R10: 0000000000000001 R11: 0000000000000217 R12: 0000000000000000 R13: 000000000000000a R14: 0000000000000000 R15: 0000000000000000 Allocated by task 2216: 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 kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3610 kmalloc include/linux/slab.h:499 [inline] kzalloc include/linux/slab.h:688 [inline] alloc_pipe_info+0xb1/0x350 fs/pipe.c:628 get_pipe_inode fs/pipe.c:707 [inline] create_pipe_files+0xda/0x930 fs/pipe.c:740 __do_pipe_flags+0x35/0x220 fs/pipe.c:797 SYSC_pipe2 fs/pipe.c:845 [inline] SyS_pipe2 fs/pipe.c:839 [inline] SYSC_pipe fs/pipe.c:863 [inline] SyS_pipe+0x8d/0x2e0 fs/pipe.c:861 entry_SYSCALL_64_fastpath+0x29/0xa0 Freed by task 2218: 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] kfree+0xd6/0x260 mm/slab.c:3803 free_pipe_info+0x200/0x2a0 fs/pipe.c:679 put_pipe_info+0xb0/0xd0 fs/pipe.c:561 pipe_release+0x1af/0x250 fs/pipe.c:582 __fput+0x327/0x7e0 fs/file_table.c:210 ____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 SYSC_exit_group kernel/exit.c:979 [inline] SyS_exit_group+0x1d/0x20 kernel/exit.c:977 entry_SYSCALL_64_fastpath+0x29/0xa0 The buggy address belongs to the object at ffff8801d6771500 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 203 bytes inside of 512-byte region [ffff8801d6771500, ffff8801d6771700) The buggy address belongs to the page: page:ffffea000759dc40 count:1 mapcount:0 mapping:ffff8801d6771000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801d6771000 0000000000000000 0000000100000006 raw: ffffea000759dba0 ffffea000759dca0 ffff8801dac00940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d6771480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801d6771500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801d6771580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801d6771600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d6771680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================