================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x9a/0xa0 lib/list_debug.c:26 Read of size 8 at addr ffff888051abf860 by task syz-executor.1/7106 CPU: 1 PID: 7106 Comm: syz-executor.1 Not tainted 5.0.0 #4 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_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __list_add_valid+0x9a/0xa0 lib/list_debug.c:26 __list_add include/linux/list.h:60 [inline] list_add_tail include/linux/list.h:93 [inline] cma_listen_on_all drivers/infiniband/core/cma.c:2477 [inline] rdma_listen+0x63b/0x8e0 drivers/infiniband/core/cma.c:3492 ucma_listen+0x14d/0x1c0 drivers/infiniband/core/ucma.c:1100 ucma_write+0x2da/0x3c0 drivers/infiniband/core/ucma.c:1689 __vfs_write+0x116/0x8e0 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457e29 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:00007f6c7baa5c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457e29 RDX: 00000000ffffff3a RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6c7baa66d4 R13: 00000000004c70d9 R14: 00000000004dcb90 R15: 00000000ffffffff Allocated by task 6798: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:468 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:509 __do_kmalloc_node mm/slab.c:3678 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3692 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:140 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:208 alloc_skb include/linux/skbuff.h:1011 [inline] sock_wmalloc+0xd9/0x120 net/core/sock.c:1943 dccp_make_response+0x8f/0xef0 net/dccp/output.c:408 dccp_v4_send_response+0xb3/0x690 net/dccp/ipv4.c:492 dccp_v4_conn_request+0xb73/0x11a0 net/dccp/ipv4.c:639 dccp_v6_conn_request+0xcb2/0x1490 net/dccp/ipv6.c:320 dccp_rcv_state_process+0x62c/0x1931 net/dccp/input.c:613 dccp_v4_do_rcv+0x100/0x190 net/dccp/ipv4.c:688 dccp_v6_do_rcv+0x98d/0xbf0 net/dccp/ipv6.c:582 sk_backlog_rcv include/net/sock.h:936 [inline] __sk_receive_skb+0x341/0xbf0 net/core/sock.c:473 dccp_v4_rcv+0xeaa/0x1bf1 net/dccp/ipv4.c:880 ip_protocol_deliver_rcu+0x60/0x8f0 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x23b/0x390 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip_local_deliver+0x1e9/0x520 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1e1/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip_rcv+0xe8/0x3f0 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083 process_backlog+0x206/0x750 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x4fa/0x1070 net/core/dev.c:6412 __do_softirq+0x266/0x95a kernel/softirq.c:292 Freed by task 6798: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:457 kasan_slab_free+0xe/0x10 mm/kasan/common.c:465 __cache_free mm/slab.c:3494 [inline] kfree+0xcf/0x230 mm/slab.c:3811 skb_free_head+0x93/0xb0 net/core/skbuff.c:557 skb_release_data+0x57e/0x7b0 net/core/skbuff.c:577 skb_release_all+0x4d/0x60 net/core/skbuff.c:631 __kfree_skb+0x16/0x30 net/core/skbuff.c:645 dccp_rcv_state_process+0x137a/0x1931 net/dccp/input.c:684 dccp_v4_do_rcv+0x100/0x190 net/dccp/ipv4.c:688 sk_backlog_rcv include/net/sock.h:936 [inline] __release_sock+0x12e/0x3a0 net/core/sock.c:2284 release_sock+0x59/0x1c0 net/core/sock.c:2800 inet_wait_for_connect net/ipv4/af_inet.c:588 [inline] __inet_stream_connect+0x59f/0xea0 net/ipv4/af_inet.c:680 inet_stream_connect+0x58/0xa0 net/ipv4/af_inet.c:719 __sys_connect+0x266/0x330 net/socket.c:1663 __do_sys_connect net/socket.c:1674 [inline] __se_sys_connect net/socket.c:1671 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1671 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 ffff888051abf680 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 480 bytes inside of 2048-byte region [ffff888051abf680, ffff888051abfe80) The buggy address belongs to the page: page:ffffea000146af80 count:1 mapcount:0 mapping:ffff88812c3f0c40 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00027c9288 ffffea0002352288 ffff88812c3f0c40 raw: 0000000000000000 ffff888051abe580 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888051abf700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888051abf780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888051abf800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888051abf880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888051abf900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================