audit: type=1400 audit(1517060941.764:12): avc: denied { net_raw } for pid=4493 comm="syz-executor0" capability=13 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: double-free or invalid-free in relay_open+0x603/0x860 kernel/relay.c:614 CPU: 0 PID: 4497 Comm: syz-executor1 Not tainted 4.9.78-g68d447c #23 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d01b78b8 ffffffff81d943a9 ffffea000742b800 ffff8801d0ae0500 ffff8801da001280 ffffffff8137d7c3 0000000000000282 ffff8801d01b78f0 ffffffff8153dc23 ffff8801d0ae0500 ffffffff8137d7c3 ffff8801da001280 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_address_description+0x73/0x280 mm/kasan/report.c:252 [] kasan_report_double_free+0x64/0xa0 mm/kasan/report.c:333 [] kasan_slab_free+0xa4/0xc0 mm/kasan/kasan.c:572 [] slab_free_hook mm/slub.c:1355 [inline] [] slab_free_freelist_hook mm/slub.c:1377 [inline] [] slab_free mm/slub.c:2958 [inline] [] kfree+0x103/0x300 mm/slub.c:3878 [] relay_open+0x603/0x860 kernel/relay.c:614 [] do_blk_trace_setup+0x3e9/0x950 kernel/trace/blktrace.c:501 [] blk_trace_setup+0xe0/0x1a0 kernel/trace/blktrace.c:545 [] blk_trace_ioctl+0x1de/0x300 kernel/trace/blktrace.c:654 [] blkdev_ioctl+0xb00/0x1a60 block/ioctl.c:576 [] block_ioctl+0xde/0x120 fs/block_dev.c:1688 [] vfs_ioctl fs/ioctl.c:43 [inline] [] do_vfs_ioctl+0x1aa/0x1140 fs/ioctl.c:679 [] SYSC_ioctl fs/ioctl.c:694 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 [] entry_SYSCALL_64_fastpath+0x29/0xe8 Allocated by task 4497: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:609 kmem_cache_alloc_trace+0xfb/0x2a0 mm/slub.c:2742 kmalloc include/linux/slab.h:490 [inline] kzalloc include/linux/slab.h:636 [inline] relay_open+0x91/0x860 kernel/relay.c:576 do_blk_trace_setup+0x3e9/0x950 kernel/trace/blktrace.c:501 blk_trace_setup+0xe0/0x1a0 kernel/trace/blktrace.c:545 blk_trace_ioctl+0x1de/0x300 kernel/trace/blktrace.c:654 blkdev_ioctl+0xb00/0x1a60 block/ioctl.c:576 block_ioctl+0xde/0x120 fs/block_dev.c:1688 vfs_ioctl fs/ioctl.c:43 [inline] do_vfs_ioctl+0x1aa/0x1140 fs/ioctl.c:679 SYSC_ioctl fs/ioctl.c:694 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 entry_SYSCALL_64_fastpath+0x29/0xe8 Freed by task 4497: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:582 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0x103/0x300 mm/slub.c:3878 relay_destroy_channel+0x16/0x20 kernel/relay.c:199 kref_sub include/linux/kref.h:73 [inline] kref_put include/linux/kref.h:98 [inline] relay_open+0x5ea/0x860 kernel/relay.c:612 do_blk_trace_setup+0x3e9/0x950 kernel/trace/blktrace.c:501 blk_trace_setup+0xe0/0x1a0 kernel/trace/blktrace.c:545 blk_trace_ioctl+0x1de/0x300 kernel/trace/blktrace.c:654 blkdev_ioctl+0xb00/0x1a60 block/ioctl.c:576 block_ioctl+0xde/0x120 fs/block_dev.c:1688 vfs_ioctl fs/ioctl.c:43 [inline] do_vfs_ioctl+0x1aa/0x1140 fs/ioctl.c:679 SYSC_ioctl fs/ioctl.c:694 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 entry_SYSCALL_64_fastpath+0x29/0xe8 The buggy address belongs to the object at ffff8801d0ae0500 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8801d0ae0500, ffff8801d0ae0700) The buggy address belongs to the page: page:ffffea000742b800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000004080(slab|head) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d0ae0400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d0ae0480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801d0ae0500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801d0ae0580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d0ae0600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================