SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13332 comm=syz-executor.3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=7 sclass=netlink_route_socket pig=13333 comm=syz-executor.3 ================================================================== BUG: KASAN: use-after-free in perf_output_read_group kernel/events/core.c:5882 [inline] BUG: KASAN: use-after-free in perf_output_read+0xedc/0x1050 kernel/events/core.c:5917 Read of size 8 at addr ffff888175ad4388 by task syz-executor.1/13292 CPU: 0 PID: 13292 Comm: syz-executor.1 Not tainted 4.14.150+ #0 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:187 __kasan_report.cold+0x1a/0x41 mm/kasan/report.c:316 perf_output_read_group kernel/events/core.c:5882 [inline] perf_output_read+0xedc/0x1050 kernel/events/core.c:5917 perf_output_sample+0xcea/0x1700 kernel/events/core.c:5959 __perf_event_output kernel/events/core.c:6269 [inline] perf_event_output_forward+0x10b/0x220 kernel/events/core.c:6282 __perf_event_overflow+0x12d/0x340 kernel/events/core.c:7520 perf_swevent_overflow+0x7a/0xf0 kernel/events/core.c:7596 perf_swevent_event+0x19c/0x270 kernel/events/core.c:7629 do_perf_sw_event kernel/events/core.c:7737 [inline] ___perf_sw_event+0x2a4/0x4a0 kernel/events/core.c:7768 __perf_sw_event+0x42/0x80 kernel/events/core.c:7780 perf_sw_event include/linux/perf_event.h:1046 [inline] __do_page_fault+0x7b8/0xbb0 arch/x86/mm/fault.c:1461 page_fault+0x22/0x50 arch/x86/entry/entry_64.S:1122 RIP: 0010:fault_in_pages_readable include/linux/pagemap.h:614 [inline] RIP: 0010:iov_iter_fault_in_readable+0x29c/0x350 lib/iov_iter.c:421 RSP: 0018:ffff888169e579d0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000003ff RCX: 0000000000040000 RDX: ffffffff81bac396 RSI: ffffc90001579000 RDI: ffff888169e57d18 RBP: 1ffff1102d3caf3b R08: ffff8881b23e40a8 R09: ffffed103b7444fa R10: 0000000000000000 R11: ffff8881dba227cf R12: 0000000000001000 R13: 0000000000000000 R14: 00000000209c21ff R15: ffff888169e57d10 generic_perform_write+0x158/0x460 mm/filemap.c:3122 __generic_file_write_iter+0x32e/0x550 mm/filemap.c:3257 ext4_file_write_iter+0x58f/0xdb0 fs/ext4/file.c:268 call_write_iter include/linux/fs.h:1798 [inline] new_sync_write fs/read_write.c:471 [inline] __vfs_write+0x401/0x5a0 fs/read_write.c:484 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:594 [inline] SyS_write+0x102/0x250 fs/read_write.c:586 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459a59 RSP: 002b:00007f8091f8bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459a59 RDX: 000000005aa78d33 RSI: 0000000020000200 RDI: 0000000000000006 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8091f8c6d4 R13: 00000000004c9aea R14: 00000000004e15a0 R15: 00000000ffffffff Allocated by task 12516: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc.part.0+0x53/0xc0 mm/kasan/common.c:501 slab_post_alloc_hook mm/slab.h:439 [inline] slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2800 [inline] __kmalloc_track_caller+0x10d/0x390 mm/slub.c:4367 __kmalloc_reserve.isra.0+0x2d/0xc0 net/core/skbuff.c:137 __alloc_skb+0x118/0x5c0 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] kobject_uevent_env+0x6d7/0xc60 lib/kobject_uevent.c:479 netdev_queue_add_kobject net/core/net-sysfs.c:1341 [inline] netdev_queue_update_kobjects+0x2ba/0x380 net/core/net-sysfs.c:1355 register_queue_kobjects net/core/net-sysfs.c:1397 [inline] netdev_register_kobject+0x228/0x31c net/core/net-sysfs.c:1603 register_netdevice+0x83d/0xc90 net/core/dev.c:7668 ip_tunnel_newlink+0x368/0x830 net/ipv4/ip_tunnel.c:1107 vti_newlink+0xae/0xf0 net/ipv4/ip_vti.c:555 rtnl_newlink+0xed3/0x16b0 net/core/rtnetlink.c:2698 rtnetlink_rcv_msg+0x3d3/0xb40 net/core/rtnetlink.c:4285 netlink_rcv_skb+0x137/0x3a0 net/netlink/af_netlink.c:2432 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x478/0x650 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x66a/0xbe0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:656 ___sys_sendmsg+0x752/0x890 net/socket.c:2062 __sys_sendmsg+0xb6/0x150 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff Freed by task 12516: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x164/0x210 mm/kasan/common.c:463 slab_free_hook mm/slub.c:1407 [inline] slab_free_freelist_hook mm/slub.c:1458 [inline] slab_free mm/slub.c:3039 [inline] kfree+0x108/0x3a0 mm/slub.c:3976 skb_free_head+0x83/0xa0 net/core/skbuff.c:554 skb_release_data+0x4e5/0x770 net/core/skbuff.c:574 skb_release_all+0x46/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] consume_skb+0xdc/0x360 net/core/skbuff.c:705 netlink_broadcast_filtered+0x2c0/0xa00 net/netlink/af_netlink.c:1488 kobject_uevent_env+0x81f/0xc60 lib/kobject_uevent.c:495 netdev_queue_add_kobject net/core/net-sysfs.c:1341 [inline] netdev_queue_update_kobjects+0x2ba/0x380 net/core/net-sysfs.c:1355 register_queue_kobjects net/core/net-sysfs.c:1397 [inline] netdev_register_kobject+0x228/0x31c net/core/net-sysfs.c:1603 register_netdevice+0x83d/0xc90 net/core/dev.c:7668 ip_tunnel_newlink+0x368/0x830 net/ipv4/ip_tunnel.c:1107 vti_newlink+0xae/0xf0 net/ipv4/ip_vti.c:555 rtnl_newlink+0xed3/0x16b0 net/core/rtnetlink.c:2698 rtnetlink_rcv_msg+0x3d3/0xb40 net/core/rtnetlink.c:4285 netlink_rcv_skb+0x137/0x3a0 net/netlink/af_netlink.c:2432 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x478/0x650 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x66a/0xbe0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:656 ___sys_sendmsg+0x752/0x890 net/socket.c:2062 __sys_sendmsg+0xb6/0x150 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff The buggy address belongs to the object at ffff888175ad4280 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 264 bytes inside of 512-byte region [ffff888175ad4280, ffff888175ad4480) The buggy address belongs to the page: page:ffffea0005d6b500 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 0000000000000000 00000001000c000c raw: ffffea00073cb080 0000000900000007 ffff8881da802c00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888175ad4280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888175ad4300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888175ad4380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888175ad4400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888175ad4480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================