linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: syzbot <syzbot+85e0b422ff140b03672a@syzkaller.appspotmail.com>
Cc: davem <davem@davemloft.net>, Dmitry Vyukov <dvyukov@google.com>,
	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: general protection fault in sctp_assoc_rwnd_increase
Date: Sun, 17 Mar 2019 21:17:56 +0800	[thread overview]
Message-ID: <CADvbK_fjUBj1PYRshztyUxmiN2b27AFGJHHOgGDpggaQqtVBUA@mail.gmail.com> (raw)
In-Reply-To: <000000000000757009058436b23f@google.com>

On Sat, Mar 16, 2019 at 10:09 PM syzbot
<syzbot+85e0b422ff140b03672a@syzkaller.appspotmail.com> wrote:
>
> syzbot has bisected this bug to:
>
> commit 89664c623617b1d34447a927ac7871ddf3db29d3
> Author: Xin Long <lucien.xin@gmail.com>
> Date:   Sun Mar 3 09:54:53 2019 +0000
>
>      sctp: sctp_sock_migrate() returns error if sctp_bind_addr_dup() fails
>
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=17b17777200000
> start commit:   89664c62 sctp: sctp_sock_migrate() returns error if sctp_b..
> git tree:       upstream
> final crash:    https://syzkaller.appspot.com/x/report.txt?x=14717777200000
> console output: https://syzkaller.appspot.com/x/log.txt?x=10717777200000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=b613f0327d980b6b
> dashboard link: https://syzkaller.appspot.com/bug?extid=85e0b422ff140b03672a
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12613b13200000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=10f1884d200000
>
> Reported-by: syzbot+85e0b422ff140b03672a@syzkaller.appspotmail.com
> Fixes: 89664c62 ("sctp: sctp_sock_migrate() returns error if
> sctp_bind_addr_dup() fails")

sctp_copy_descendant() coplied sctp_sock->pd_lobby. we should fix it with:
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 06c6f4a..e0857dd 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -9175,7 +9175,7 @@ static inline void sctp_copy_descendant(struct
sock *sk_to,
 {
  int ancestor_size = sizeof(struct inet_sock) +
      sizeof(struct sctp_sock) -
-     offsetof(struct sctp_sock, auto_asconf_list);
+     offsetof(struct sctp_sock, pd_lobby);

  if (sk_from->sk_family == PF_INET6)
  ancestor_size += sizeof(struct ipv6_pinfo);

      reply	other threads:[~2019-03-17 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12 13:52 general protection fault in sctp_assoc_rwnd_increase syzbot
2019-03-12 16:29 ` Xin Long
2019-03-12 17:26   ` Dmitry Vyukov
2019-03-18  6:25     ` Xin Long
2019-03-16 14:09 ` syzbot
2019-03-17 13:17   ` 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_fjUBj1PYRshztyUxmiN2b27AFGJHHOgGDpggaQqtVBUA@mail.gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --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+85e0b422ff140b03672a@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).