================================================================== BUG: KASAN: slab-out-of-bounds in sock_net include/net/sock.h:2436 [inline] BUG: KASAN: slab-out-of-bounds in ip_send_unicast_reply+0x1040/0x11b0 net/ipv4/ip_output.c:1569 Read of size 8 at addr ffff8880a6a6d2bc by task syz-executor0/13184 CPU: 0 PID: 13184 Comm: syz-executor0 Not tainted 5.0.0-rc4+ #47 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 sock_net include/net/sock.h:2436 [inline] ip_send_unicast_reply+0x1040/0x11b0 net/ipv4/ip_output.c:1569 tcp_v4_send_reset+0x1051/0x2140 net/ipv4/tcp_ipv4.c:775 tcp_v4_rcv+0x209e/0x3730 net/ipv4/tcp_ipv4.c:1936 ip_protocol_deliver_rcu+0x60/0x8e0 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+0x1f4/0x2f0 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 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1027 do_softirq.part.0+0x11a/0x170 kernel/softirq.c:337 do_softirq kernel/softirq.c:329 [inline] __local_bh_enable_ip+0x211/0x270 kernel/softirq.c:189 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:696 [inline] ip_finish_output2+0x99c/0x1740 net/ipv4/ip_output.c:231 ip_finish_output+0x73c/0xd50 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip_output+0x21f/0x670 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:444 [inline] ip_local_out+0xc4/0x1b0 net/ipv4/ip_output.c:124 __ip_queue_xmit+0x86f/0x1bf0 net/ipv4/ip_output.c:505 ip_queue_xmit+0x5a/0x70 include/net/ip.h:198 __tcp_transmit_skb+0x1a32/0x3730 net/ipv4/tcp_output.c:1159 tcp_transmit_skb net/ipv4/tcp_output.c:1175 [inline] tcp_send_syn_data net/ipv4/tcp_output.c:3498 [inline] tcp_connect+0x1e67/0x4330 net/ipv4/tcp_output.c:3537 tcp_v4_connect+0x1514/0x1c40 net/ipv4/tcp_ipv4.c:315 __inet_stream_connect+0x83f/0xea0 net/ipv4/af_inet.c:655 tcp_sendmsg_fastopen net/ipv4/tcp.c:1163 [inline] tcp_sendmsg_locked+0x2347/0x34b0 net/ipv4/tcp.c:1205 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1440 inet_sendmsg+0x147/0x5d0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:631 __sys_sendto+0x262/0x380 net/socket.c:1810 __do_sys_sendto net/socket.c:1822 [inline] __se_sys_sendto net/socket.c:1818 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1818 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457e39 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:00007f6dbee05c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000457e39 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000020e68000 R09: 0000000000000010 R10: 00000000200007fd R11: 0000000000000246 R12: 00007f6dbee066d4 R13: 00000000004c547e R14: 00000000004d9248 R15: 00000000ffffffff Allocated by task 7677: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:496 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:504 kmem_cache_alloc_trace+0x151/0x760 mm/slab.c:3609 kmalloc include/linux/slab.h:545 [inline] kzalloc include/linux/slab.h:740 [inline] mca_alloc net/ipv6/mcast.c:859 [inline] __ipv6_dev_mc_inc+0x3cf/0xa60 net/ipv6/mcast.c:917 ipv6_dev_mc_inc+0x20/0x30 net/ipv6/mcast.c:941 addrconf_join_solict.part.0+0xb5/0xf0 net/ipv6/addrconf.c:2150 addrconf_join_solict net/ipv6/addrconf.c:3935 [inline] addrconf_dad_begin net/ipv6/addrconf.c:3935 [inline] addrconf_dad_work+0x1b3/0x1150 net/ipv6/addrconf.c:4062 process_one_work+0x98e/0x1760 kernel/workqueue.c:2153 worker_thread+0x98/0xe40 kernel/workqueue.c:2296 kthread+0x357/0x430 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8880a6a6d180 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 60 bytes to the right of 256-byte region [ffff8880a6a6d180, ffff8880a6a6d280) The buggy address belongs to the page: page:ffffea00029a9b40 count:1 mapcount:0 mapping:ffff88812c3f07c0 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00024e7608 ffffea000235f888 ffff88812c3f07c0 raw: 0000000000000000 ffff8880a6a6d040 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6a6d180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a6a6d200: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc >ffff8880a6a6d280: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff8880a6a6d300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a6a6d380: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ==================================================================