================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xf1/0x100 lib/list_debug.c:51 Read of size 8 at addr ffff8881d8152bb0 by task kworker/0:3/6328 CPU: 0 PID: 6328 Comm: kworker/0:3 Not tainted 4.20.0-rc6-next-20181210+ #164 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.4+0x9/0x1ff mm/kasan/report.c:187 kasan_report.cold.5+0x1b/0x39 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __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 11517: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] kasan_kmalloc+0xcb/0xd0 mm/kasan/common.c:482 __do_kmalloc_node mm/slab.c:3671 [inline] __kmalloc_node_track_caller+0x4d/0x70 mm/slab.c:3685 __kmalloc_reserve.isra.38+0x41/0xe0 net/core/skbuff.c:137 pskb_expand_head+0x230/0x10f0 net/core/skbuff.c:1467 ___pskb_trim+0x9de/0x1320 net/core/skbuff.c:1774 __pskb_trim include/linux/skbuff.h:2556 [inline] pskb_trim include/linux/skbuff.h:2563 [inline] sk_filter_trim_cap+0x968/0xa70 net/core/filter.c:121 tcp_filter+0xb7/0x170 net/ipv4/tcp_ipv4.c:1737 tcp_v4_rcv+0x2dd6/0x3d30 net/ipv4/tcp_ipv4.c:1893 ip_protocol_deliver_rcu+0xb5/0xa10 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x243/0x390 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x1e9/0x750 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1f9/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xed/0x600 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4971 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5081 process_backlog+0x24e/0x7a0 net/core/dev.c:5911 napi_poll net/core/dev.c:6334 [inline] net_rx_action+0x7fa/0x19b0 net/core/dev.c:6400 __do_softirq+0x308/0xb7e kernel/softirq.c:292 Freed by task 9: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:444 kasan_slab_free+0xe/0x10 mm/kasan/common.c:452 __cache_free mm/slab.c:3485 [inline] kfree+0xcf/0x230 mm/slab.c:3804 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 tcp_drop+0xd2/0x100 net/ipv4/tcp_input.c:4405 tcp_prune_ofo_queue.part.54+0x206/0x7e0 net/ipv4/tcp_input.c:5031 tcp_prune_ofo_queue net/ipv4/tcp_input.c:5021 [inline] tcp_prune_queue net/ipv4/tcp_input.c:5090 [inline] tcp_try_rmem_schedule+0xeb5/0x1c30 net/ipv4/tcp_input.c:4471 tcp_data_queue_ofo net/ipv4/tcp_input.c:4492 [inline] tcp_data_queue+0x1088/0x4290 net/ipv4/tcp_input.c:4798 tcp_rcv_established+0xcbb/0x2190 net/ipv4/tcp_input.c:5656 tcp_v4_do_rcv+0x635/0x8f0 net/ipv4/tcp_ipv4.c:1538 tcp_v4_rcv+0x31e4/0x3d30 net/ipv4/tcp_ipv4.c:1912 ip_protocol_deliver_rcu+0xb5/0xa10 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x243/0x390 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x1e9/0x750 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1f9/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xed/0x600 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4971 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5081 process_backlog+0x24e/0x7a0 net/core/dev.c:5911 napi_poll net/core/dev.c:6334 [inline] net_rx_action+0x7fa/0x19b0 net/core/dev.c:6400 __do_softirq+0x308/0xb7e kernel/softirq.c:292 The buggy address belongs to the object at ffff8881d8152940 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 624 bytes inside of 1024-byte region [ffff8881d8152940, ffff8881d8152d40) The buggy address belongs to the page: page:ffffea0007605480 count:1 mapcount:0 mapping:ffff8881da800ac0 index:0xffff8881d8152940 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0006e8e508 ffffea0007658388 ffff8881da800ac0 raw: ffff8881d8152940 ffff8881d8152040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d8152a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d8152b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881d8152b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881d8152c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d8152c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================