================================================================== BUG: KASAN: use-after-free in tipc_sk_filter_rcv+0x2166/0x34f0 net/tipc/socket.c:2167 Read of size 4 at addr ffff8880a66489f4 by task syz-executor.5/9156 CPU: 0 PID: 9156 Comm: syz-executor.5 Not tainted 5.0.0+ #67 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_sendstream+0x34b/0xe10 net/tipc/socket.c:1465 tipc_sendstream+0x53/0x80 net/tipc/socket.c:1430 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:661 ___sys_sendmsg+0x806/0x930 net/socket.c:2260 __sys_sendmsg+0x105/0x1d0 net/socket.c:2298 __do_sys_sendmsg net/socket.c:2307 [inline] __se_sys_sendmsg net/socket.c:2305 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2305 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458209 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:00007fe006531c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458209 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000005 RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe0065326d4 R13: 00000000004c5187 R14: 00000000004d8f38 R15: 00000000ffffffff Allocated by task 9151: 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_sk_send_ack+0x19b/0x4e0 net/tipc/socket.c:1664 tipc_recvstream+0x8e3/0xa10 net/tipc/socket.c:1924 sock_recvmsg_nosec net/socket.c:881 [inline] sock_recvmsg net/socket.c:888 [inline] sock_recvmsg+0xd0/0x110 net/socket.c:884 ___sys_recvmsg+0x273/0x5a0 net/socket.c:2422 __sys_recvmsg+0x102/0x1d0 net/socket.c:2471 __do_sys_recvmsg net/socket.c:2481 [inline] __se_sys_recvmsg net/socket.c:2478 [inline] __x64_sys_recvmsg+0x78/0xb0 net/socket.c:2478 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9156: 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_conn_proto_rcv net/tipc/socket.c:1268 [inline] tipc_sk_proto_rcv net/tipc/socket.c:1986 [inline] tipc_sk_filter_rcv+0x241b/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_sendstream+0x34b/0xe10 net/tipc/socket.c:1465 tipc_sendstream+0x53/0x80 net/tipc/socket.c:1430 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:661 ___sys_sendmsg+0x806/0x930 net/socket.c:2260 __sys_sendmsg+0x105/0x1d0 net/socket.c:2298 __do_sys_sendmsg net/socket.c:2307 [inline] __se_sys_sendmsg net/socket.c:2305 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2305 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 ffff8880a6648940 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 180 bytes inside of 1024-byte region [ffff8880a6648940, ffff8880a6648d40) The buggy address belongs to the page: page:ffffea0002999200 count:1 mapcount:0 mapping:ffff88812c3f0ac0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002a43f88 ffffea00022d1788 ffff88812c3f0ac0 raw: 0000000000000000 ffff8880a6648040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6648880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a6648900: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880a6648980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a6648a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a6648a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================