================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xf1/0x100 lib/list_debug.c:51 Read of size 8 at addr ffff8881cc6d66f0 by task kworker/0:3/6402 CPU: 0 PID: 6402 Comm: kworker/0:3 Not tainted 4.20.0-rc4+ #333 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_power_efficient neigh_periodic_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __list_del_entry_valid+0xf1/0x100 lib/list_debug.c:51 __list_del_entry include/linux/list.h:117 [inline] list_del_init include/linux/list.h:159 [inline] neigh_mark_dead+0x13b/0x410 net/core/neighbour.c:125 neigh_periodic_work+0x89a/0xc30 net/core/neighbour.c:905 process_one_work+0xc90/0x1c40 kernel/workqueue.c:2153 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Allocated by task 10612: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3684 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3698 __kmalloc_reserve.isra.40+0x41/0xe0 net/core/skbuff.c:137 __alloc_skb+0x155/0x770 net/core/skbuff.c:205 alloc_skb_fclone include/linux/skbuff.h:1050 [inline] sk_stream_alloc_skb+0x141/0x970 net/ipv4/tcp.c:874 tcp_sendmsg_locked+0xee6/0x3f80 net/ipv4/tcp.c:1286 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1443 inet_sendmsg+0x1a1/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 sock_write_iter+0x35e/0x5c0 net/socket.c:900 call_write_iter include/linux/fs.h:1857 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x6b8/0x9f0 fs/read_write.c:487 vfs_write+0x1fc/0x560 fs/read_write.c:549 ksys_write+0x101/0x260 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+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10618: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 skb_free_head+0x99/0xc0 net/core/skbuff.c:550 skb_release_data+0x70c/0x9a0 net/core/skbuff.c:570 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb+0x15/0x20 net/core/skbuff.c:641 sk_wmem_free_skb include/net/sock.h:1458 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:1762 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3141 [inline] tcp_ack+0x1eb0/0x58a0 net/ipv4/tcp_input.c:3668 tcp_rcv_established+0x19cb/0x2190 net/ipv4/tcp_input.c:5573 tcp_v4_do_rcv+0x635/0x8f0 net/ipv4/tcp_ipv4.c:1538 sk_backlog_rcv include/net/sock.h:932 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2284 release_sock+0xad/0x2c0 net/core/sock.c:2797 sk_wait_data+0x271/0x630 net/core/sock.c:2326 tcp_recvmsg+0x2139/0x3450 net/ipv4/tcp.c:2079 inet_recvmsg+0x181/0x6d0 net/ipv4/af_inet.c:830 sock_recvmsg_nosec net/socket.c:794 [inline] sock_recvmsg+0xd0/0x110 net/socket.c:801 ___sys_recvmsg+0x2b6/0x680 net/socket.c:2278 __sys_recvmsg+0x11a/0x280 net/socket.c:2327 __do_sys_recvmsg net/socket.c:2337 [inline] __se_sys_recvmsg net/socket.c:2334 [inline] __x64_sys_recvmsg+0x78/0xb0 net/socket.c:2334 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881cc6d6480 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 624 bytes inside of 1024-byte region [ffff8881cc6d6480, ffff8881cc6d6880) The buggy address belongs to the page: page:ffffea000731b580 count:1 mapcount:0 mapping:ffff8881da800ac0 index:0xffff8881cc6d6d80 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0007450788 ffffea0006f32c88 ffff8881da800ac0 raw: ffff8881cc6d6d80 ffff8881cc6d6000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cc6d6580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cc6d6600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881cc6d6680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881cc6d6700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cc6d6780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================