Re: [syzbot] memory leak in mld_newpack

From: syzbot
Date: Fri Sep 16 2022 - 18:13:45 EST


syzbot has found a reproducer for the following issue on:

HEAD commit: 6879c2d3b960 Merge tag 'pinctrl-v6.0-2' of git://git.kerne..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1053435d080000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4afe4efcad47dde
dashboard link: https://syzkaller.appspot.com/bug?extid=dcd3e13cf4472f2e0ba1
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11842b37080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15078ed5080000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0e68bb9c6cf9/disk-6879c2d3.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bf179217db31/vmlinux-6879c2d3.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+dcd3e13cf4472f2e0ba1@xxxxxxxxxxxxxxxxxxxxxxxxx

BUG: memory leak
unreferenced object 0xffff88810bb0bb00 (size 240):
comm "kworker/0:2", pid 143, jiffies 4294946271 (age 15.640s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 bb b0 0b 81 88 ff ff ................
00 70 aa 11 81 88 ff ff 80 10 e9 44 81 88 ff ff .p.........D....
backtrace:
[<ffffffff8387bb59>] __alloc_skb+0x1f9/0x270 net/core/skbuff.c:422
[<ffffffff8388255a>] alloc_skb include/linux/skbuff.h:1257 [inline]
[<ffffffff8388255a>] alloc_skb_with_frags+0x6a/0x340 net/core/skbuff.c:6021
[<ffffffff8387508f>] sock_alloc_send_pskb+0x39f/0x3d0 net/core/sock.c:2665
[<ffffffff83d4eb01>] sock_alloc_send_skb include/net/sock.h:1866 [inline]
[<ffffffff83d4eb01>] mld_newpack.isra.0+0x81/0x200 net/ipv6/mcast.c:1748
[<ffffffff83d4ed26>] add_grhead+0xa6/0xc0 net/ipv6/mcast.c:1851
[<ffffffff83d4f4fc>] add_grec+0x7bc/0x820 net/ipv6/mcast.c:1989
[<ffffffff83d514e3>] mld_send_cr net/ipv6/mcast.c:2115 [inline]
[<ffffffff83d514e3>] mld_ifc_work+0x273/0x750 net/ipv6/mcast.c:2653
[<ffffffff8127afca>] process_one_work+0x2ba/0x5f0 kernel/workqueue.c:2289
[<ffffffff8127b8e9>] worker_thread+0x59/0x5b0 kernel/workqueue.c:2436
[<ffffffff81284c95>] kthread+0x125/0x160 kernel/kthread.c:376
[<ffffffff8100224f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306