linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Konovalov <andreyknvl@google.com>
To: syzkaller <syzkaller@googlegroups.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-sctp@vger.kernel.org, netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	Alexander Potapenko <glider@google.com>,
	Kostya Serebryany <kcc@google.com>,
	Eric Dumazet <edumazet@google.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Subject: Re: net/sctp: null-ptr-deref in sctp_inet_listen
Date: Wed, 9 Nov 2016 20:24:20 +0100	[thread overview]
Message-ID: <CAAeHK+x5tsuCjrxdj_AAedQEcii-H70ZbJpi6ZYzj0m4H-W1GQ@mail.gmail.com> (raw)
In-Reply-To: <CADvbK_dswzCgnQXMSiTOsODXP19epKkQsoUgLmv8PORhfAzwFA@mail.gmail.com>

On Wed, Nov 9, 2016 at 4:32 AM, Xin Long <lucien.xin@gmail.com> wrote:
> this fix may break TYPE_SCTP_PRIMITIVE_SHUTDOWN statetable,
> could you give the following one a try ? thanks.

This one also works.

Thanks.

>
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -4288,9 +4288,9 @@ static void sctp_shutdown(struct sock *sk, int how)
>                 return;
>
>         if (how & SEND_SHUTDOWN) {
> -               sk->sk_state = SCTP_SS_CLOSING;
>                 ep = sctp_sk(sk)->ep;
>                 if (!list_empty(&ep->asocs)) {
> +                       sk->sk_state = SCTP_SS_CLOSING;
>                         asoc = list_entry(ep->asocs.next,
>                                           struct sctp_association, asocs);
>                         sctp_primitive_SHUTDOWN(net, asoc, NULL);
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

      reply	other threads:[~2016-11-09 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 21:44 net/sctp: null-ptr-deref in sctp_inet_listen Andrey Konovalov
2016-11-08 10:06 ` Xin Long
2016-11-08 18:46   ` Andrey Konovalov
2016-11-09  3:32     ` Xin Long
2016-11-09 19:24       ` Andrey Konovalov [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=CAAeHK+x5tsuCjrxdj_AAedQEcii-H70ZbJpi6ZYzj0m4H-W1GQ@mail.gmail.com \
    --to=andreyknvl@google.com \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=glider@google.com \
    --cc=kcc@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=syzkaller@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).