================================================================== BUG: KASAN: use-after-free in tipc_sk_filter_rcv+0x2166/0x34f0 net/tipc/socket.c:2167 Read of size 4 at addr ffff8880a86ee9b4 by task syz-executor.0/8019 CPU: 0 PID: 8019 Comm: syz-executor.0 Not tainted 5.0.0+ #101 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_release+0x9ed/0x14d0 net/tipc/socket.c:592 __sock_release+0xd3/0x2b0 net/socket.c:599 sock_close+0x1b/0x30 net/socket.c:1247 __fput+0x2e5/0x8d0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x14a/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x273/0x2c0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x52d/0x610 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x411e31 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 e4 1a 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007fff5a197d60 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000007 RCX: 0000000000411e31 RDX: 0000000000000000 RSI: 0000000000740170 RDI: 0000000000000006 RBP: 0000000000000000 R08: 0000000000740168 R09: 000000000000d22f R10: 00007fff5a197c80 R11: 0000000000000293 R12: 0000000000000001 R13: 00007fff5a197da0 R14: 0000000000000000 R15: 00007fff5a197db0 Allocated by task 45: 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:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x357/0x430 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Freed by task 8019: 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_release+0x9ed/0x14d0 net/tipc/socket.c:592 __sock_release+0xd3/0x2b0 net/socket.c:599 sock_close+0x1b/0x30 net/socket.c:1247 __fput+0x2e5/0x8d0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x14a/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x273/0x2c0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x52d/0x610 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a86ee900 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 180 bytes inside of 1024-byte region [ffff8880a86ee900, ffff8880a86eed00) The buggy address belongs to the page: page:ffffea0002a1bb80 count:1 mapcount:0 mapping:ffff88812c3f0ac0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00028f8d08 ffffea00028f9f88 ffff88812c3f0ac0 raw: 0000000000000000 ffff8880a86ee000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a86ee880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a86ee900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a86ee980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a86eea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a86eea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================