public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: cgxu519 <cgxu519@gmx.com>, David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] jffs2: add additinal sanity check for jffs2_acl_from_medium()
Date: Mon, 03 Sep 2018 16:01:31 +0200	[thread overview]
Message-ID: <2672376.Ws11GeDHN2@blindfold> (raw)
In-Reply-To: <56f970fc-ac3b-94d8-0f00-5db3fa68ca65@gmx.com>

Am Montag, 3. September 2018, 15:28:31 CEST schrieb cgxu519:
> On 09/03/2018 04:45 PM, Richard Weinberger wrote:
> > On Sun, Sep 2, 2018 at 5:45 PM Chengguang Xu <cgxu519@gmx.com> wrote:
> >> In the case ACL_USER and ACL_GROUP we check if value has exceeded end,
> >> add same check in the case ACL_OTHER as well.
> > Did you hit a problem in that area or was this found by review?
> >  From looking at the code I'd say it is fine as is.
> > In the ACL_MASK/_OTHER case we don't look into the entry object like
> > ACL_USER/_GROUP
> > do, we immediately break the switch and run another round in the for loop.
> > And here we do:
> >                  entry = value;
> >                  if (value + sizeof(struct jffs2_acl_entry_short) > end)
> >                          goto fail;
> >
> > Which is what your additional check does. So, we'd check twice.
> > What do I miss?
> 
> You are right, it is actually not needed. Sorry, please just drop the patch.

No problem, that's why we have a review process. :-)

Thanks,
//richard

      reply	other threads:[~2018-09-03 14:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-02 15:44 [PATCH] jffs2: add additinal sanity check for jffs2_acl_from_medium() Chengguang Xu
2018-09-03  8:45 ` Richard Weinberger
2018-09-03 13:28   ` cgxu519
2018-09-03 14:01     ` Richard Weinberger [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=2672376.Ws11GeDHN2@blindfold \
    --to=richard@nod.at \
    --cc=cgxu519@gmx.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.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