================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x8f/0xac lib/list_debug.c:26 Read of size 8 at addr ffff8881ba55cff0 by task syz-executor5/8390 CPU: 0 PID: 8390 Comm: syz-executor5 Not tainted 4.20.0-rc4+ #335 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+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_add_valid+0x8f/0xac lib/list_debug.c:26 __list_add include/linux/list.h:60 [inline] list_add_tail include/linux/list.h:93 [inline] neigh_alloc net/core/neighbour.c:395 [inline] ___neigh_create+0x14b7/0x2600 net/core/neighbour.c:553 __neigh_create+0x30/0x40 net/core/neighbour.c:640 ip_finish_output2+0xb8b/0x1860 net/ipv4/ip_output.c:224 ip_do_fragment+0x2173/0x2ad0 net/ipv4/ip_output.c:678 ip_fragment.constprop.51+0x179/0x240 net/ipv4/ip_output.c:549 ip_finish_output+0x6b4/0xfa0 net/ipv4/ip_output.c:315 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip_output+0x21d/0x8d0 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:444 [inline] ip_local_out+0xc5/0x1b0 net/ipv4/ip_output.c:124 ip_send_skb+0x40/0xe0 net/ipv4/ip_output.c:1464 udp_send_skb.isra.46+0x6ad/0x1160 net/ipv4/udp.c:929 udp_push_pending_frames+0x5c/0xf0 net/ipv4/udp.c:957 udp_sendmsg+0x17ae/0x3c40 net/ipv4/udp.c:1248 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 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2116 __sys_sendmsg+0x11d/0x280 net/socket.c:2154 __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg net/socket.c:2161 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457659 Code: fd b3 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007faec1550c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457659 RDX: 0000000000000000 RSI: 00000000200004c0 RDI: 0000000000000003 RBP: 000000000072bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007faec15516d4 R13: 00000000004c3e8d R14: 00000000004d6cf8 R15: 00000000ffffffff Allocated by task 8323: 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 mm/slab.c:3722 [inline] __kmalloc+0x15b/0x760 mm/slab.c:3731 kmalloc include/linux/slab.h:551 [inline] kzalloc include/linux/slab.h:741 [inline] neigh_alloc net/core/neighbour.c:375 [inline] ___neigh_create+0x13fc/0x2600 net/core/neighbour.c:553 __neigh_create+0x30/0x40 net/core/neighbour.c:640 neigh_create include/net/neighbour.h:319 [inline] __neigh_lookup_errno include/net/neighbour.h:511 [inline] arp_req_set+0x59d/0xaa0 net/ipv4/arp.c:1066 arp_ioctl+0x48b/0xae0 net/ipv4/arp.c:1230 inet_ioctl+0x237/0x360 net/ipv4/af_inet.c:932 sock_do_ioctl+0xeb/0x420 net/socket.c:950 sock_ioctl+0x313/0x690 net/socket.c:1074 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8339: 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 __rcu_reclaim kernel/rcu/rcu.h:233 [inline] rcu_do_batch kernel/rcu/tree.c:2437 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2716 [inline] rcu_process_callbacks+0x1140/0x1ac0 kernel/rcu/tree.c:2697 __do_softirq+0x308/0xb7e kernel/softirq.c:292 The buggy address belongs to the object at ffff8881ba55cd80 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 624 bytes inside of 1024-byte region [ffff8881ba55cd80, ffff8881ba55d180) The buggy address belongs to the page: page:ffffea0006e95700 count:1 mapcount:0 mapping:ffff8881da800ac0 index:0xffff8881ba55c900 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0006e70c08 ffff8881da801838 ffff8881da800ac0 raw: ffff8881ba55c900 ffff8881ba55c000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: kobject: 'loop1' (00000000394f46fd): kobject_uevent_env ffff8881ba55ce80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb kobject: 'loop1' (00000000394f46fd): fill_kobj_path: path = '/devices/virtual/block/loop1' ffff8881ba55cf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881ba55cf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881ba55d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881ba55d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================