[PATCH] ubifs: Do not skip hash checking in data nodes

Richard Weinberger richard at nod.at
Thu Apr 4 13:06:50 PDT 2019

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 at 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


More information about the linux-mtd mailing list