[syzbot] memory leak in xfrm_user_rcv_msg

23 views
Skip to first unread message

syzbot

unread,
Jun 22, 2021, 3:04:24 PM6/22/21
to da...@davemloft.net, her...@gondor.apana.org.au, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, steffen....@secunet.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: fd0aa1a4 Merge tag 'for-linus' of git://git.kernel.org/pub..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17464aa4300000
kernel config: https://syzkaller.appspot.com/x/.config?x=6ec2526c74098317
dashboard link: https://syzkaller.appspot.com/bug?extid=fb347cf82c73a90efcca
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14946548300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10d28548300000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fb347c...@syzkaller.appspotmail.com

BUG: memory leak
unreferenced object 0xffff88810f402d00 (size 232):
comm "syz-executor486", pid 8416, jiffies 4294943639 (age 13.060s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff836a0d5f>] __alloc_skb+0x20f/0x280 net/core/skbuff.c:413
[<ffffffff83ad5686>] alloc_skb include/linux/skbuff.h:1107 [inline]
[<ffffffff83ad5686>] xfrm_alloc_compat+0x1d6/0x6d0 net/xfrm/xfrm_compat.c:324
[<ffffffff83ad2b4c>] xfrm_alloc_userspi+0x29c/0x3f0 net/xfrm/xfrm_user.c:1448
[<ffffffff83ace7f8>] xfrm_user_rcv_msg+0x208/0x3e0 net/xfrm/xfrm_user.c:2812
[<ffffffff838233d7>] netlink_rcv_skb+0x87/0x1d0 net/netlink/af_netlink.c:2504
[<ffffffff83acc9e2>] xfrm_netlink_rcv+0x32/0x40 net/xfrm/xfrm_user.c:2824
[<ffffffff838225c2>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
[<ffffffff838225c2>] netlink_unicast+0x392/0x4c0 net/netlink/af_netlink.c:1340
[<ffffffff83822a58>] netlink_sendmsg+0x368/0x6a0 net/netlink/af_netlink.c:1929
[<ffffffff836908a6>] sock_sendmsg_nosec net/socket.c:654 [inline]
[<ffffffff836908a6>] sock_sendmsg+0x56/0x80 net/socket.c:674
[<ffffffff83696c6f>] sock_no_sendpage+0x8f/0xc0 net/core/sock.c:2862
[<ffffffff836901ab>] kernel_sendpage.part.0+0xeb/0x150 net/socket.c:3631
[<ffffffff83690e8b>] kernel_sendpage net/socket.c:3628 [inline]
[<ffffffff83690e8b>] sock_sendpage+0x5b/0x90 net/socket.c:947
[<ffffffff815b8872>] pipe_to_sendpage+0xa2/0x110 fs/splice.c:364
[<ffffffff815ba712>] splice_from_pipe_feed fs/splice.c:418 [inline]
[<ffffffff815ba712>] __splice_from_pipe+0x1e2/0x330 fs/splice.c:562
[<ffffffff815baf3f>] splice_from_pipe fs/splice.c:597 [inline]
[<ffffffff815baf3f>] generic_splice_sendpage+0x6f/0xa0 fs/splice.c:746
[<ffffffff815b892b>] do_splice_from fs/splice.c:767 [inline]
[<ffffffff815b892b>] direct_splice_actor+0x4b/0x70 fs/splice.c:936



---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

Pavel Skripkin

unread,
Jun 24, 2021, 3:12:56 PM6/24/21
to syzbot, da...@davemloft.net, her...@gondor.apana.org.au, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, steffen....@secunet.com, syzkall...@googlegroups.com
On Tue, 22 Jun 2021 12:04:23 -0700
syzbot <syzbot+fb347c...@syzkaller.appspotmail.com> wrote:

> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: fd0aa1a4 Merge tag 'for-linus' of
> git://git.kernel.org/pub.. git tree: upstream
> console output:
> https://syzkaller.appspot.com/x/log.txt?x=17464aa4300000 kernel
> config: https://syzkaller.appspot.com/x/.config?x=6ec2526c74098317
> dashboard link:
> https://syzkaller.appspot.com/bug?extid=fb347cf82c73a90efcca syz
> repro:
> https://syzkaller.appspot.com/x/repro.syz?x=14946548300000 C
> reproducer: https://syzkaller.appspot.com/x/repro.c?x=10d28548300000
>
> IMPORTANT: if you fix the issue, please add the following tag to the
> commit: Reported-by:
> syzbot+fb347c...@syzkaller.appspotmail.com
>


#syz test
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master


With regards,
Pavel Skripkin
0001-net-xfrm-fix-memory-leak-in-xfrm_user_rcv_msg.patch

syzbot

unread,
Jun 24, 2021, 3:30:12 PM6/24/21
to da...@davemloft.net, her...@gondor.apana.org.au, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, paskr...@gmail.com, steffen....@secunet.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+fb347c...@syzkaller.appspotmail.com

Tested on:

commit: 4a09d388 Merge tag 'mmc-v5.13-rc6' of git://git.kernel.org..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=be86be9dadf57eea
dashboard link: https://syzkaller.appspot.com/bug?extid=fb347cf82c73a90efcca
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=14c17dbfd00000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages