JFFS2 OOPS in 2.6.20

David Woodhouse dwmw2 at infradead.org
Fri Mar 9 04:46:51 EST 2007


On Fri, 2007-03-09 at 10:36 +0100, Joakim Tjernlund wrote:
> I am starting to think that this error is due to an old design mistake
> in JFFS2 I pointed out years ago: crc32 sums are seeded with zero instead of -1

Indeed. But you only pointed it out in 2004, which was 3 years too
late :)
 
> Zero seed makes an zeroed JFFS2 header match its crc32 and that is what I think
> is happening here, readinode.c:576 should reject this node but doesn't due to this flaw)
> 
> What to do:
> 1) Add extra checks for zeroed headers?

That's the approach in the patch I just sent you.

> 2) Add an config option where one can change the crc32 seed to -1? 

If we're going to change it, why not change to something cheaper, like
Adler32? As you also pointed out. I suspect we should just leave it as
it is with the extra checks though.

-- 
dwmw2





More information about the linux-mtd mailing list