Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in ___neigh_create
BUG: memory leak
unreferenced object 0xffff888141124400 (size 512):
comm "kworker/0:1", pid 9, jiffies 4294940595 (age 78.200s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 13 25 86 ff ff ff ff ..........%.....
40 85 07 08 81 88 ff ff 43 80 ff ff 00 00 00 00 @.......C.......
backtrace:
[<ffffffff8157491b>] __do_kmalloc_node mm/slab_common.c:1022 [inline]
[<ffffffff8157491b>] __kmalloc+0x4b/0x150 mm/slab_common.c:1036
[<ffffffff83ef8832>] kmalloc include/linux/slab.h:603 [inline]
[<ffffffff83ef8832>] kzalloc include/linux/slab.h:720 [inline]
[<ffffffff83ef8832>] neigh_alloc net/core/neighbour.c:486 [inline]
[<ffffffff83ef8832>] ___neigh_create+0xf2/0xe10 net/core/neighbour.c:640
[<ffffffff8434bd2e>] ip6_finish_output2+0x73e/0x990 net/ipv6/ip6_output.c:126
[<ffffffff84351151>] __ip6_finish_output net/ipv6/ip6_output.c:196 [inline]
[<ffffffff84351151>] ip6_finish_output+0x291/0x510 net/ipv6/ip6_output.c:207
[<ffffffff84351471>] NF_HOOK_COND include/linux/netfilter.h:293 [inline]
[<ffffffff84351471>] ip6_output+0xa1/0x1c0 net/ipv6/ip6_output.c:228
[<ffffffff843a14e9>] dst_output include/net/dst.h:458 [inline]
[<ffffffff843a14e9>] NF_HOOK.constprop.0+0x49/0x110 include/linux/netfilter.h:304
[<ffffffff843a17d3>] mld_sendpack+0x223/0x350 net/ipv6/mcast.c:1818
[<ffffffff843a4ba0>] mld_send_cr net/ipv6/mcast.c:2119 [inline]
[<ffffffff843a4ba0>] mld_ifc_work+0x2b0/0x6b0 net/ipv6/mcast.c:2651
[<ffffffff812c8d9d>] process_one_work+0x23d/0x530 kernel/workqueue.c:2630
[<ffffffff812c99c7>] process_scheduled_works kernel/workqueue.c:2703 [inline]
[<ffffffff812c99c7>] worker_thread+0x327/0x590 kernel/workqueue.c:2784
[<ffffffff812d6d9b>] kthread+0x12b/0x170 kernel/kthread.c:388
[<ffffffff81149f85>] ret_from_fork+0x45/0x50 arch/x86/kernel/process.c:147
[<ffffffff81002be1>] ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
BUG: memory leak
unreferenced object 0xffff888141125800 (size 512):
comm "kworker/0:1", pid 9, jiffies 4294940597 (age 78.180s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 13 25 86 ff ff ff ff ..........%.....
00 86 07 08 81 88 ff ff 45 80 ff ff 00 00 00 00 ........E.......
backtrace:
[<ffffffff8157491b>] __do_kmalloc_node mm/slab_common.c:1022 [inline]
[<ffffffff8157491b>] __kmalloc+0x4b/0x150 mm/slab_common.c:1036
[<ffffffff83ef8832>] kmalloc include/linux/slab.h:603 [inline]
[<ffffffff83ef8832>] kzalloc include/linux/slab.h:720 [inline]
[<ffffffff83ef8832>] neigh_alloc net/core/neighbour.c:486 [inline]
[<ffffffff83ef8832>] ___neigh_create+0xf2/0xe10 net/core/neighbour.c:640
[<ffffffff8434bd2e>] ip6_finish_output2+0x73e/0x990 net/ipv6/ip6_output.c:126
[<ffffffff84351151>] __ip6_finish_output net/ipv6/ip6_output.c:196 [inline]
[<ffffffff84351151>] ip6_finish_output+0x291/0x510 net/ipv6/ip6_output.c:207
[<ffffffff84351471>] NF_HOOK_COND include/linux/netfilter.h:293 [inline]
[<ffffffff84351471>] ip6_output+0xa1/0x1c0 net/ipv6/ip6_output.c:228
[<ffffffff843a14e9>] dst_output include/net/dst.h:458 [inline]
[<ffffffff843a14e9>] NF_HOOK.constprop.0+0x49/0x110 include/linux/netfilter.h:304
[<ffffffff843a17d3>] mld_sendpack+0x223/0x350 net/ipv6/mcast.c:1818
[<ffffffff843a4ba0>] mld_send_cr net/ipv6/mcast.c:2119 [inline]
[<ffffffff843a4ba0>] mld_ifc_work+0x2b0/0x6b0 net/ipv6/mcast.c:2651
[<ffffffff812c8d9d>] process_one_work+0x23d/0x530 kernel/workqueue.c:2630
[<ffffffff812c99c7>] process_scheduled_works kernel/workqueue.c:2703 [inline]
[<ffffffff812c99c7>] worker_thread+0x327/0x590 kernel/workqueue.c:2784
[<ffffffff812d6d9b>] kthread+0x12b/0x170 kernel/kthread.c:388
[<ffffffff81149f85>] ret_from_fork+0x45/0x50 arch/x86/kernel/process.c:147
[<ffffffff81002be1>] ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
BUG: memory leak
unreferenced object 0xffff888141124200 (size 512):
comm "kworker/0:1", pid 9, jiffies 4294940597 (age 78.180s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 13 25 86 ff ff ff ff ..........%.....
40 85 07 08 81 88 ff ff 45 80 ff ff 00 00 00 00 @.......E.......
backtrace:
[<ffffffff8157491b>] __do_kmalloc_node mm/slab_common.c:1022 [inline]
[<ffffffff8157491b>] __kmalloc+0x4b/0x150 mm/slab_common.c:1036
[<ffffffff83ef8832>] kmalloc include/linux/slab.h:603 [inline]
[<ffffffff83ef8832>] kzalloc include/linux/slab.h:720 [inline]
[<ffffffff83ef8832>] neigh_alloc net/core/neighbour.c:486 [inline]
[<ffffffff83ef8832>] ___neigh_create+0xf2/0xe10 net/core/neighbour.c:640
[<ffffffff8434bd2e>] ip6_finish_output2+0x73e/0x990 net/ipv6/ip6_output.c:126
[<ffffffff84351151>] __ip6_finish_output net/ipv6/ip6_output.c:196 [inline]
[<ffffffff84351151>] ip6_finish_output+0x291/0x510 net/ipv6/ip6_output.c:207
[<ffffffff84351471>] NF_HOOK_COND include/linux/netfilter.h:293 [inline]
[<ffffffff84351471>] ip6_output+0xa1/0x1c0 net/ipv6/ip6_output.c:228
[<ffffffff8438ac19>] dst_output include/net/dst.h:458 [inline]
[<ffffffff8438ac19>] NF_HOOK.constprop.0+0x49/0x110 include/linux/netfilter.h:304
[<ffffffff8438af29>] ndisc_send_skb+0x249/0x3c0 net/ipv6/ndisc.c:509
[<ffffffff8438fc05>] ndisc_send_ns+0x85/0xf0 net/ipv6/ndisc.c:667
[<ffffffff8436423e>] addrconf_dad_work+0x67e/0x980 net/ipv6/addrconf.c:4213
[<ffffffff812c8d9d>] process_one_work+0x23d/0x530 kernel/workqueue.c:2630
[<ffffffff812c99c7>] process_scheduled_works kernel/workqueue.c:2703 [inline]
[<ffffffff812c99c7>] worker_thread+0x327/0x590 kernel/workqueue.c:2784
[<ffffffff812d6d9b>] kthread+0x12b/0x170 kernel/kthread.c:388
[<ffffffff81149f85>] ret_from_fork+0x45/0x50 arch/x86/kernel/process.c:147
[<ffffffff81002be1>] ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
BUG: memory leak
unreferenced object 0xffff8881008aba00 (size 512):
comm "dhcpcd", pid 4693, jiffies 4294940607 (age 78.080s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 13 25 86 ff ff ff ff ..........%.....
c0 83 07 08 81 88 ff ff 4f 80 ff ff 00 00 00 00 ........O.......
backtrace:
[<ffffffff8157491b>] __do_kmalloc_node mm/slab_common.c:1022 [inline]
[<ffffffff8157491b>] __kmalloc+0x4b/0x150 mm/slab_common.c:1036
[<ffffffff83ef8832>] kmalloc include/linux/slab.h:603 [inline]
[<ffffffff83ef8832>] kzalloc include/linux/slab.h:720 [inline]
[<ffffffff83ef8832>] neigh_alloc net/core/neighbour.c:486 [inline]
[<ffffffff83ef8832>] ___neigh_create+0xf2/0xe10 net/core/neighbour.c:640
[<ffffffff8434bd2e>] ip6_finish_output2+0x73e/0x990 net/ipv6/ip6_output.c:126
[<ffffffff84351151>] __ip6_finish_output net/ipv6/ip6_output.c:196 [inline]
[<ffffffff84351151>] ip6_finish_output+0x291/0x510 net/ipv6/ip6_output.c:207
[<ffffffff84351471>] NF_HOOK_COND include/linux/netfilter.h:293 [inline]
[<ffffffff84351471>] ip6_output+0xa1/0x1c0 net/ipv6/ip6_output.c:228
[<ffffffff844133e2>] dst_output include/net/dst.h:458 [inline]
[<ffffffff844133e2>] ip6_local_out+0x52/0x70 net/ipv6/output_core.c:155
[<ffffffff84351fa7>] ip6_send_skb+0x27/0xc0 net/ipv6/ip6_output.c:2017
[<ffffffff843520b7>] ip6_push_pending_frames+0x77/0x90 net/ipv6/ip6_output.c:2037
[<ffffffff8439b3eb>] rawv6_push_pending_frames net/ipv6/raw.c:581 [inline]
[<ffffffff8439b3eb>] rawv6_sendmsg+0x189b/0x1db0 net/ipv6/raw.c:920
[<ffffffff84265f79>] inet_sendmsg+0x49/0x70 net/ipv4/af_inet.c:840
[<ffffffff83e96c12>] sock_sendmsg_nosec net/socket.c:730 [inline]
[<ffffffff83e96c12>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
[<ffffffff83e97265>] ____sys_sendmsg+0x365/0x470 net/socket.c:2558
[<ffffffff83e9b6d9>] ___sys_sendmsg+0xc9/0x130 net/socket.c:2612
[<ffffffff83e9b886>] __sys_sendmsg+0xa6/0x120 net/socket.c:2641
[<ffffffff84b38548>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84b38548>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
[<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
console output:
https://syzkaller.appspot.com/x/log.txt?x=16826829680000
patch:
https://syzkaller.appspot.com/x/patch.diff?x=108f17f1680000