Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Cengiz Can <cengiz@kernel.wtf>
Cc: Eric Van Hensbergen <ericvh@gmail.com>,
Latchesar Ionkov <lucho@ionkov.net>,
Dominique Martinet <asmadeus@codewreck.org>,
Christoph Hellwig <hch@lst.de>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk,
v9fs-developer@lists.sourceforge.net,
syzbot <syzbot+d012ca3f813739c37c25@syzkaller.appspotmail.com>
Subject: Re: WARNING in __kernel_read
Date: Thu, 23 Jul 2020 08:51:42 -0700 [thread overview]
Message-ID: <20200723155142.GA870@sol.localdomain> (raw)
In-Reply-To: <455c6bf929ea197a7c18ba3f9e8464148b333297.camel@kernel.wtf>
Hi Cengiz,
On Thu, Jul 23, 2020 at 05:17:25PM +0300, Cengiz Can wrote:
> Hello,
>
> I'm trying to help clean up syzkaller submissions and this caught my
> attention and I wanted to get your advice.
>
> With commit: 6209dd9132e8ea5545cffc84483841e88ea8cc5b `kernel_read` was
> modified to use `__kernel_read` by Christoph Hellwig.
>
> One of the syzkaller tests executes following system calls:
>
> open("./file0", O_WRONLY|O_CREAT|O_EXCL|O_DIRECT|0x4, 000) = 5
> open("/dev/char/4:1", O_RDWR) = 6
> mount(NULL, "./file0", "9p", 0,
> "trans=fd,rfdno=0x0000000000000005,wfdno=0x0000000000000006,"
>
> This initiates a `__kernel_read` call from `p9_read_work` (and
> `p9_fd_read`) and since the `file->f_mode` does not contain FMODE_READ
> , a WARN_ON_ONCE is thrown.
>
> ```
> if (WARN_ON_ONCE(!(file->f_mode & FMODE_READ)))
> return -EINVAL;
> ```
>
> Can you help me understand what's wrong and fix this issue?
> Is it already being worked on?
>
Looks like this was already fixed in linux-next by:
commit a39c46067c845a8a2d7144836e9468b7f072343e
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Jul 10 10:57:22 2020 +0200
net/9p: validate fds in p9_fd_open
Let's tell syzbot so that it closes this bug report:
#syz fix: net/9p: validate fds in p9_fd_open
next prev parent reply other threads:[~2020-07-23 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 7:03 syzbot
2020-07-14 11:02 ` Christoph Hellwig
2020-07-23 14:17 ` Cengiz Can
2020-07-23 15:51 ` Eric Biggers [this message]
2021-10-06 9:33 Hao Sun
2021-10-06 12:17 ` Matthew Wilcox
2021-10-06 13:57 ` Theodore Ts'o
2021-10-06 22:10 ` Kees Cook
2021-10-12 6:21 ` Christoph Hellwig
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=20200723155142.GA870@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=asmadeus@codewreck.org \
--cc=cengiz@kernel.wtf \
--cc=ericvh@gmail.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=syzbot+d012ca3f813739c37c25@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=viro@zeniv.linux.org.uk \
--subject='Re: WARNING in __kernel_read' \
/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
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).