netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: syzbot <syzbot+d44f7bbebdea49dbc84a@syzkaller.appspotmail.com>
Cc: davem <davem@davemloft.net>, LKML <linux-kernel@vger.kernel.org>,
	linux-sctp@vger.kernel.org,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	network dev <netdev@vger.kernel.org>,
	Neil Horman <nhorman@tuxdriver.com>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	Vlad Yasevich <vyasevich@gmail.com>
Subject: Re: memory leak in sctp_get_port_local (3)
Date: Tue, 15 Oct 2019 01:12:19 +0800	[thread overview]
Message-ID: <CADvbK_e5yjk3LBGUdYw9L-5zOibDZJtHJKOSkw8ConqZGgv6CQ@mail.gmail.com> (raw)
In-Reply-To: <0000000000007193390594d5e959@google.com>

On Mon, Oct 14, 2019 at 10:50 AM syzbot
<syzbot+d44f7bbebdea49dbc84a@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:    da940012 Merge tag 'char-misc-5.4-rc3' of git://git.kernel..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11c87fc7600000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=e76c708f07645488
> dashboard link: https://syzkaller.appspot.com/bug?extid=d44f7bbebdea49dbc84a
> compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=128d3f8b600000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17ead04b600000
We probably need to add ".no_autobind = true" in sctp_prot to prevent
sendmsg() from going the path: inet_sendmsg()->inet_send_prepare()->
inet_autobind(), and leave sctp_sendmsg() to handle sctp_autobind().

will have a try tomorrow.

>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+d44f7bbebdea49dbc84a@syzkaller.appspotmail.com
>
> executing program
> executing program
> BUG: memory leak
> unreferenced object 0xffff888120b3d380 (size 64):
>    comm "syz-executor517", pid 6949, jiffies 4294941316 (age 13.400s)
>    hex dump (first 32 bytes):
>      23 4e 00 00 00 00 00 00 00 00 00 00 00 00 00 00  #N..............
>      88 16 ef 24 81 88 ff ff 00 00 00 00 00 00 00 00  ...$............
>    backtrace:
>      [<000000006e6207b2>] kmemleak_alloc_recursive
> include/linux/kmemleak.h:43 [inline]
>      [<000000006e6207b2>] slab_post_alloc_hook mm/slab.h:586 [inline]
>      [<000000006e6207b2>] slab_alloc mm/slab.c:3319 [inline]
>      [<000000006e6207b2>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3483
>      [<00000000d0d058e2>] sctp_bucket_create net/sctp/socket.c:8523 [inline]
>      [<00000000d0d058e2>] sctp_get_port_local+0x189/0x5a0
> net/sctp/socket.c:8270
>      [<0000000082735c7f>] sctp_do_bind+0xcc/0x200 net/sctp/socket.c:402
>      [<0000000080c8d55e>] sctp_bindx_add+0x4b/0xd0 net/sctp/socket.c:497
>      [<00000000eb10f474>] sctp_setsockopt_bindx+0x156/0x1b0
> net/sctp/socket.c:1022
>      [<000000004e959dd5>] sctp_setsockopt net/sctp/socket.c:4641 [inline]
>      [<000000004e959dd5>] sctp_setsockopt+0xaea/0x2dc0 net/sctp/socket.c:4611
>      [<000000000e9e767a>] sock_common_setsockopt+0x38/0x50
> net/core/sock.c:3147
>      [<00000000a549638a>] __sys_setsockopt+0x10f/0x220 net/socket.c:2084
>      [<000000003c15b96c>] __do_sys_setsockopt net/socket.c:2100 [inline]
>      [<000000003c15b96c>] __se_sys_setsockopt net/socket.c:2097 [inline]
>      [<000000003c15b96c>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2097
>      [<00000000ee3ea8a3>] do_syscall_64+0x73/0x1f0
> arch/x86/entry/common.c:290
>      [<000000006bf005e9>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
>
>
>
> ---
> This bug 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 syzkaller@googlegroups.com.
>
> syzbot will keep track of this bug report. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
> syzbot can test patches for this bug, for details see:
> https://goo.gl/tpsmEJ#testing-patches

      reply	other threads:[~2019-10-14 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14  2:49 memory leak in sctp_get_port_local (3) syzbot
2019-10-14 17:12 ` Xin Long [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADvbK_e5yjk3LBGUdYw9L-5zOibDZJtHJKOSkw8ConqZGgv6CQ@mail.gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=syzbot+d44f7bbebdea49dbc84a@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=vyasevich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).