All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-mtd@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH] ubifs: Do not skip hash checking in data nodes
Date: Thu, 04 Apr 2019 22:06:50 +0200	[thread overview]
Message-ID: <2388716.Aa7BLnGvdY@blindfold> (raw)
In-Reply-To: <20190401130044.19811-1-s.hauer@pengutronix.de>

Am Montag, 1. April 2019, 15:00:44 CEST schrieb Sascha Hauer:
> UBIFS bails out early from try_read_node() when it doesn't have to check
> the CRC. Still the node hash has to be checked, otherwise wrong data
> could be sneaked into the FS. Fix this by not bailing out early and
> always checking the node hash.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Good catch!

I think we need another UBIFS self-check to catch such issues.
How about adding a marker to each in-memory node/page up on checking?
That way a self-check can walk UBIFS in-memory data structures and check
whether everything has the marker set. If not, we found a bug in the auth
code.

Thanks,
//richard



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2019-04-04 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 13:00 [PATCH] ubifs: Do not skip hash checking in data nodes Sascha Hauer
2019-04-04 20:06 ` 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=2388716.Aa7BLnGvdY@blindfold \
    --to=richard@nod.at \
    --cc=kernel@pengutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.