From: Xin Long <lucien.xin@gmail.com>
To: syzbot <syzbot+ec1b7575afef85a0e5ca@syzkaller.appspotmail.com>
Cc: akpm@linux-foundation.org, aryabinin@virtuozzo.com, cai@lca.pw,
davem <davem@davemloft.net>, Dmitry Vyukov <dvyukov@google.com>,
guro@fb.com, hannes@cmpxchg.org, jbacik@fb.com,
Kirill Tkhai <ktkhai@virtuozzo.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, linux-sctp@vger.kernel.org,
mgorman@techsingularity.net, mhocko@suse.com,
network dev <netdev@vger.kernel.org>,
Neil Horman <nhorman@tuxdriver.com>,
shakeelb@google.com,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
viro@zeniv.linux.org.uk, Vlad Yasevich <vyasevich@gmail.com>,
willy@infradead.org
Subject: Re: kernel panic: corrupted stack end in wb_workfn
Date: Wed, 20 Mar 2019 02:03:03 +0800 [thread overview]
Message-ID: <CADvbK_f6cDsJzXa3fzj3EFq+-hRD9EYXqbhkXq8gHqMEpqp8bA@mail.gmail.com> (raw)
In-Reply-To: <000000000000db3d130584506672@google.com>
On Mon, Mar 18, 2019 at 4:49 AM syzbot
<syzbot+ec1b7575afef85a0e5ca@syzkaller.appspotmail.com> wrote:
>
> syzbot has bisected this bug to:
>
> commit c981f254cc82f50f8cb864ce6432097b23195b9c
> Author: Al Viro <viro@zeniv.linux.org.uk>
> Date: Sun Jan 7 18:19:09 2018 +0000
>
> sctp: use vmemdup_user() rather than badly open-coding memdup_user()
'addrs_size' is passed from users, we actually used GFP_USER to
put some more restrictions on it in this commit:
commit cacc06215271104b40773c99547c506095db6ad4
Author: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Mon Nov 30 14:32:54 2015 -0200
sctp: use GFP_USER for user-controlled kmalloc
However, vmemdup_user() will 'ignore' this flag when going to vmalloc_*(),
So we probably should fix it by using memdup_user() to avoid that
open-coding part instead:
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index ea95cd4..e5bcade 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -999,7 +999,7 @@ static int sctp_setsockopt_bindx(struct sock *sk,
if (unlikely(addrs_size <= 0))
return -EINVAL;
- kaddrs = vmemdup_user(addrs, addrs_size);
+ kaddrs = memdup_user(addrs, addrs_size);
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=137bcecf200000
> start commit: c981f254 sctp: use vmemdup_user() rather than badly open-c..
> git tree: upstream
> final crash: https://syzkaller.appspot.com/x/report.txt?x=10fbcecf200000
> console output: https://syzkaller.appspot.com/x/log.txt?x=177bcecf200000
> kernel config: https://syzkaller.appspot.com/x/.config?x=5e7dc790609552d7
> dashboard link: https://syzkaller.appspot.com/bug?extid=ec1b7575afef85a0e5ca
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16a9a84b400000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17199bb3400000
>
> Reported-by: syzbot+ec1b7575afef85a0e5ca@syzkaller.appspotmail.com
> Fixes: c981f254 ("sctp: use vmemdup_user() rather than badly open-coding
> memdup_user()")
next prev parent reply other threads:[~2019-03-19 18:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-31 3:41 syzbot
2018-12-31 3:41 ` syzbot
2018-12-31 3:47 ` Qian Cai
2018-12-31 6:31 ` Dmitry Vyukov
2018-12-31 6:31 ` Dmitry Vyukov
2019-03-17 20:49 ` syzbot
2019-03-19 18:03 ` Xin Long [this message]
2019-03-20 9:56 ` Andrey Ryabinin
2019-03-20 9:59 ` Dmitry Vyukov
2019-03-20 10:23 ` Tetsuo Handa
2019-03-20 10:38 ` Dmitry Vyukov
2019-03-20 10:42 ` Dmitry Vyukov
2019-03-20 10:58 ` Tetsuo Handa
2019-03-20 13:59 ` Dmitry Vyukov
2019-03-20 13:34 ` Andrey Ryabinin
2019-03-20 13:57 ` Dmitry Vyukov
2019-03-21 9:45 ` Dmitry Vyukov
2019-03-21 9:51 ` Dmitry Vyukov
2019-03-21 11:41 ` Tetsuo Handa
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_f6cDsJzXa3fzj3EFq+-hRD9EYXqbhkXq8gHqMEpqp8bA@mail.gmail.com \
--to=lucien.xin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=cai@lca.pw \
--cc=davem@davemloft.net \
--cc=dvyukov@google.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=jbacik@fb.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-sctp@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=shakeelb@google.com \
--cc=syzbot+ec1b7575afef85a0e5ca@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=viro@zeniv.linux.org.uk \
--cc=vyasevich@gmail.com \
--cc=willy@infradead.org \
/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