From: Linus Torvalds <torvalds@linux-foundation.org>
To: syzbot+2a831e062bb4aebd8755@syzkaller.appspotmail.com,
Eric Van Hensbergen <ericvh@gmail.com>,
Ron Minnich <rminnich@sandia.gov>,
Latchesar Ionkov <lucho@ionkov.net>
Cc: Jens Axboe <axboe@kernel.dk>,
Bart Van Assche <bart.vanassche@wdc.com>,
David Miller <davem@davemloft.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>,
Sagi Grimberg <sagi@grimberg.me>,
syzkaller-bugs@googlegroups.com
Subject: Re: general protection fault in in_aton
Date: Tue, 10 Jul 2018 12:44:14 -0700 [thread overview]
Message-ID: <CA+55aFyEZR=v2GySzWWF3uh9ZB53CFFv460Wzg4n8DGze8GFfw@mail.gmail.com> (raw)
In-Reply-To: <000000000000c242e90570aa0062@google.com>
On Tue, Jul 10, 2018 at 12:19 PM syzbot
<syzbot+2a831e062bb4aebd8755@syzkaller.appspotmail.com> wrote:
> RIP: 0010:in_aton+0x3e/0x180 net/core/utils.c:63
That's
if (*str != '\0') {
in in_aton().
The code disassembles to
movzbl (%rax,%r15,1),%eax
which is a bit odd, because
> RAX: 0000000000000000
Ok, NULL pointer, looks sane, but:
> R15: dffffc0000000000
Yeah, that's unusual. But I'm guessing it's some KASAN artifact. One
of the big problemns with KASAN is that it makes the generated code
completely illegible because 90% of the code is just KASAN overhead.
> Call Trace:
> rdma_create_trans+0xdbe/0x1ed0 net/9p/trans_rdma.c:678
Well, rdma_create_trans() certainly doesn't verify 'addr' before using it.
> p9_client_create+0x915/0x16c9 net/9p/client.c:1062
p9_client_create() just blindly passes on "dev_name"
> v9fs_session_init+0x21a/0x1a80 fs/9p/v9fs.c:400
> v9fs_mount+0x7c/0x900 fs/9p/vfs_super.c:135
.. as does v9fs_session_init() and v9fs_mount()
> mount_fs+0xae/0x328 fs/super.c:1277
> vfs_kern_mount.part.34+0xdc/0x4e0 fs/namespace.c:1037
> vfs_kern_mount fs/namespace.c:1027 [inline]
> do_new_mount fs/namespace.c:2518 [inline]
> do_mount+0x581/0x30e0 fs/namespace.c:2848
This is "name" in mount_fs(), vfs_kern_mount(), do_new_mount() and
do_mount(), also just passed through.
> __do_compat_sys_mount fs/compat.c:125 [inline]
> __se_compat_sys_mount fs/compat.c:92 [inline]
> __ia32_compat_sys_mount+0x5d5/0x860 fs/compat.c:92
And here we have the source:
kernel_dev = copy_mount_string(dev_name);
Note that copy_mount_string() just passes a NULL user space pointer
through as a NULL kernel pointer (otherwise it does a
"strndup_user()".
And no, this is not a compat issue. The native mount does the same thing.
So yes. The device name can trivially be NULL, and either rdma or the
p9 code should check for NULL.
Adding in the 9p people, because I think it's for them. Note the
syzbot info below.
Linus
--
syzbot found the following crash on:
HEAD commit: 092150a25cb7 Merge branch 'for-linus' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1687b168400000
kernel config: https://syzkaller.appspot.com/x/.config?x=25856fac4e580aa7
dashboard link: https://syzkaller.appspot.com/bug?extid=2a831e062bb4aebd8755
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
userspace arch: i386
syzkaller repro:https://syzkaller.appspot.com/x/repro.syz?x=158cc2c2400000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16e7ef48400000
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+2a831e062bb4aebd8755@syzkaller.appspotmail.com
next prev parent reply other threads:[~2018-07-10 19:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 19:19 general protection fault in in_aton syzbot
2018-07-10 19:44 ` Linus Torvalds [this message]
2018-07-10 19:56 ` Dmitry Vyukov
2018-07-10 20:15 ` Linus Torvalds
2018-07-11 16:47 ` Dmitry Vyukov
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='CA+55aFyEZR=v2GySzWWF3uh9ZB53CFFv460Wzg4n8DGze8GFfw@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=davem@davemloft.net \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=netdev@vger.kernel.org \
--cc=rminnich@sandia.gov \
--cc=sagi@grimberg.me \
--cc=syzbot+2a831e062bb4aebd8755@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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).