linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Murphy Zhou <jencce.kernel@gmail.com>
To: "Aurélien Aptel" <aaptel@suse.com>
Cc: Murphy Zhou <jencce.kernel@gmail.com>, linux-cifs@vger.kernel.org
Subject: Re: [PATCH] CIFS: fix max ea value size
Date: Sun, 22 Sep 2019 09:25:01 +0800	[thread overview]
Message-ID: <20190922012501.g6yon32sxlzdvkgj@XZHOUW.usersys.redhat.com> (raw)
In-Reply-To: <878sqhfqzf.fsf@suse.com>

On Sat, Sep 21, 2019 at 08:23:32PM +0200, Aurélien Aptel wrote:
> "Murphy Zhou" <jencce.kernel@gmail.com> writes:
> > It should not be larger then the slab max buf size. If user
> > specifies a larger size, it passes this check and goes
> > straightly to SMB2_set_info_init performing an insecure memcpy.
> 
> It's even smaller than that as CIFSMaxBufSize is the max size for the
> whole packet IIRC. The EA payload needs to fit into that. So it should
> be CIFSMaxBufSize-(largest SMB2 header size + Set EA initial header).

No need. Slab size includes the bufzise and the header size.

> And if we set multiple EA at the same time it has to be divided
> by the number of EAs etc...

They will be handled separately and slab will work well.

> 
> Cheers,
> -- 
> Aurélien Aptel / SUSE Labs Samba Team
> GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
> SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
> GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)

  reply	other threads:[~2019-09-22  1:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-21 11:26 [PATCH] CIFS: fix max ea value size Murphy Zhou
2019-09-21 18:23 ` Aurélien Aptel
2019-09-22  1:25   ` Murphy Zhou [this message]
2019-09-24  5:24     ` Steve French
2019-09-24 21:16     ` Aurélien Aptel

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=20190922012501.g6yon32sxlzdvkgj@XZHOUW.usersys.redhat.com \
    --to=jencce.kernel@gmail.com \
    --cc=aaptel@suse.com \
    --cc=linux-cifs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).