================================================================== BUG: KASAN: use-after-free in tipc_sk_filter_rcv+0x2166/0x34f0 net/tipc/socket.c:2167 Read of size 4 at addr ffff8880947dc9f4 by task syz-executor.0/11959 CPU: 0 PID: 11959 Comm: syz-executor.0 Not tainted 5.1.0-rc1-next-20190320 #7 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 tipc_sk_filter_rcv+0x2166/0x34f0 net/tipc/socket.c:2167 tipc_sk_backlog_rcv+0xeb/0x1e0 net/tipc/socket.c:2217 sk_backlog_rcv include/net/sock.h:943 [inline] __release_sock+0x12e/0x3a0 net/core/sock.c:2413 release_sock+0x59/0x1c0 net/core/sock.c:2929 tipc_setsockopt+0x496/0xb60 net/tipc/socket.c:3014 __sys_setsockopt+0x180/0x280 net/socket.c:2046 __do_sys_setsockopt net/socket.c:2057 [inline] __se_sys_setsockopt net/socket.c:2054 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2054 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458079 Code: ad b8 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 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f27472e8c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000458079 RDX: 0000000000000087 RSI: 000000000000010f RDI: 0000000000000006 RBP: 000000000073bf00 R08: 0000000000000034 R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 00007f27472e96d4 R13: 00000000004c619f R14: 00000000004db210 R15: 00000000ffffffff Allocated by task 3011: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:511 __do_kmalloc_node mm/slab.c:3686 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3700 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:140 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:208 alloc_skb_fclone include/linux/skbuff.h:1107 [inline] tipc_buf_acquire+0x2f/0x100 net/tipc/msg.c:66 tipc_msg_create+0x38/0x270 net/tipc/msg.c:98 tipc_topsrv_kern_evt+0x2a7/0x580 net/tipc/topsrv.c:602 tipc_conn_send_to_sock+0x43e/0x5f0 net/tipc/topsrv.c:283 tipc_conn_send_work+0x65/0x80 net/tipc/topsrv.c:303 process_one_work+0x98e/0x1790 kernel/workqueue.c:2270 worker_thread+0x98/0xe40 kernel/workqueue.c:2416 kthread+0x357/0x430 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Freed by task 11959: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3821 skb_free_head+0x93/0xb0 net/core/skbuff.c:557 skb_release_data+0x576/0x7a0 net/core/skbuff.c:577 skb_release_all+0x4d/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb net/core/skbuff.c:663 [inline] kfree_skb+0xe8/0x390 net/core/skbuff.c:657 tipc_sk_proto_rcv net/tipc/socket.c:2009 [inline] tipc_sk_filter_rcv+0x1e6a/0x34f0 net/tipc/socket.c:2162 tipc_sk_backlog_rcv+0xeb/0x1e0 net/tipc/socket.c:2217 sk_backlog_rcv include/net/sock.h:943 [inline] __release_sock+0x12e/0x3a0 net/core/sock.c:2413 release_sock+0x59/0x1c0 net/core/sock.c:2929 tipc_setsockopt+0x496/0xb60 net/tipc/socket.c:3014 __sys_setsockopt+0x180/0x280 net/socket.c:2046 __do_sys_setsockopt net/socket.c:2057 [inline] __se_sys_setsockopt net/socket.c:2054 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2054 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880947dc940 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 180 bytes inside of 1024-byte region [ffff8880947dc940, ffff8880947dcd40) The buggy address belongs to the page: page:ffffea000251f700 count:1 mapcount:0 mapping:ffff88812c3f0ac0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002513c88 ffffea00025f3d08 ffff88812c3f0ac0 raw: 0000000000000000 ffff8880947dc040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880947dc880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880947dc900: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880947dc980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880947dca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880947dca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================