linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Doug Nazar <nazard@nazar.ca>
Cc: Christoph Hellwig <hch@lst.de>,
	ericvh@gmail.com, lucho@ionkov.net,
	v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	syzbot+e6f77e16ff68b2434a2c@syzkaller.appspotmail.com
Subject: Re: [PATCH] net/9p: validate fds in p9_fd_open
Date: Sat, 11 Jul 2020 12:49:23 +0200	[thread overview]
Message-ID: <20200711104923.GA6584@nautica> (raw)
In-Reply-To: <5bee3e33-2400-2d85-080e-d10cd82b0d85@nazar.ca>

Doug Nazar wrote on Fri, Jul 10, 2020:
> On 2020-07-10 04:57, Christoph Hellwig wrote:
> 
> >diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
> >index 13cd683a658ab6..1cd8ea0e493617 100644
> >--- a/net/9p/trans_fd.c
> >+++ b/net/9p/trans_fd.c
> >@@ -803,20 +803,28 @@ static int p9_fd_open(struct p9_client *client, int rfd, int wfd)
> >  		return -ENOMEM;
> >  	ts->rd = fget(rfd);
> >+	if (!ts->rd)
> >+		goto out_free_ts;
> >+	if (!(ts->rd->f_mode & FMODE_READ))
> >+		goto out_put_wr;
> 
> 		goto out_put_rd;
> 
> unless I'm mistaken.

Good catch, I've amended the commit so feel free to skip resending
unless want to change something
https://github.com/martinetd/linux/commit/28e987a0dc66744fb119e18150188fd8e3debd40

-- 
Dominique

  reply	other threads:[~2020-07-11 10:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10  8:57 [PATCH] net/9p: validate fds in p9_fd_open Christoph Hellwig
2020-07-10 11:12 ` Dominique Martinet
2020-07-10 22:56 ` Doug Nazar
2020-07-11 10:49   ` Dominique Martinet [this message]
2020-07-13  7:38     ` Christoph Hellwig
2020-07-15  7:37     ` Christoph Hellwig
2020-07-15 13:47       ` Dominique Martinet
2020-07-15 18:19         ` Christoph Hellwig
2020-07-15 21:24         ` David Miller
2020-07-16  7:58           ` Dominique Martinet
2020-07-16 20:13             ` David Miller

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=20200711104923.GA6584@nautica \
    --to=asmadeus@codewreck.org \
    --cc=ericvh@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=nazard@nazar.ca \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+e6f77e16ff68b2434a2c@syzkaller.appspotmail.com \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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).