================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x93/0xa0 lib/list_debug.c:26 Read of size 8 at addr ffff8880b452f3d8 by task syz-executor.3/6992 CPU: 1 PID: 6992 Comm: syz-executor.3 Not tainted 4.14.304-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 __list_add_valid+0x93/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:2327 [inline] rdma_listen+0x656/0x9b0 drivers/infiniband/core/cma.c:3339 ucma_listen+0x10b/0x170 drivers/infiniband/core/ucma.c:1078 ucma_write+0x206/0x2c0 drivers/infiniband/core/ucma.c:1672 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7ff591d750c9 RSP: 002b:00007ff5902e7168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff591e94f80 RCX: 00007ff591d750c9 RDX: 0000000000000018 RSI: 0000000020000300 RDI: 0000000000000004 RBP: 00007ff591dd0ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffed683ba6f R14: 00007ff5902e7300 R15: 0000000000022000 Allocated by task 20337: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3696 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x96/0x510 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1168 [inline] netlink_sendmsg+0x91e/0xbc0 net/netlink/af_netlink.c:1868 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 20337: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x5f6/0x820 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] kfree_skb+0xe7/0x390 net/core/skbuff.c:672 netlink_unicast_kernel net/netlink/af_netlink.c:1299 [inline] netlink_unicast+0x563/0x610 net/netlink/af_netlink.c:1322 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 The buggy address belongs to the object at ffff8880b452f200 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 472 bytes inside of 1024-byte region [ffff8880b452f200, ffff8880b452f600) The buggy address belongs to the page: page:ffffea0002d14b80 count:1 mapcount:0 mapping:ffff8880b452e000 index:0xffff8880b452e000 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880b452e000 ffff8880b452e000 0000000100000004 raw: ffffea0002adbea0 ffffea00024bf620 ffff88813fe74ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b452f280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b452f300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880b452f380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b452f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b452f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================