From: Tomas Bortoli <tomasbortoli@gmail.com>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: davem@davemloft.net, v9fs-developer@lists.sourceforge.net,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller@googlegroups.com
Subject: Re: [PATCH] 9p: validate PDU length
Date: Wed, 25 Jul 2018 12:50:36 +0200 [thread overview]
Message-ID: <b3c5017f-34d0-c9f4-ec29-1fbb4aa4969a@gmail.com> (raw)
In-Reply-To: <20180725041139.GB11041@nautica>
On 07/25/2018 06:11 AM, Dominique Martinet wrote:
> Tomas Bortoli wrote on Mon, Jul 23, 2018:
>> diff --git a/net/9p/client.c b/net/9p/client.c
>> index 18c5271910dc..92240ccf476b 100644
>> --- a/net/9p/client.c
>> +++ b/net/9p/client.c
>> @@ -524,6 +525,12 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
>> int ecode;
>>
>> err = p9_parse_header(req->rc, NULL, &type, NULL, 0);
>> + if (req->rc->size >= c->msize) {
>
> I was looking at this again, I think it's more appropriate to use
> req->rc->capacity at this point like you did in the first version of the
> patch.
>
> I had suggested msize in the common p9_parse_header function because
> that'd let us accept zc requests where the size in the pdu could be
> bigger than capacity, but this isn't the case in p9_check_errors.
>
> If you're ok with this I'll edit your commit directly, this is less work
> for me than having to check a new patch.
>
> Thanks,
>
Yes sure, just forward me the changes later.
Tomas
prev parent reply other threads:[~2018-07-25 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 15:44 [PATCH] 9p: validate PDU length Tomas Bortoli
2018-07-24 3:57 ` Dominique Martinet
2018-07-25 4:11 ` Dominique Martinet
2018-07-25 10:50 ` Tomas Bortoli [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=b3c5017f-34d0-c9f4-ec29-1fbb4aa4969a@gmail.com \
--to=tomasbortoli@gmail.com \
--cc=asmadeus@codewreck.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=syzkaller@googlegroups.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).