Re: [CHECKER] 84 bugs in 2.4.4/2.4.4-ac8 where NULL pointers are

Alexander Viro (viro@math.psu.edu)
Wed, 30 May 2001 01:45:00 -0400 (EDT)


On Tue, 29 May 2001, Andreas Dilger wrote:

> For ext2 it is pretty much the same, except ext2_delete_entry() called
> ext2_check_dir_entry() with a NULL input (for some reason), but it could
> easily supply a valid input value. All callers to ext2_delete_entry()
> dereference the dir parameter before calling ext2_delete_entry(). All
> other paths dereference dir before ext2_check_dir_entry() is called.

Wrong fix. It
a) doesn't close all potential problems (think what happens if you
run too close to the end of buffer)
b) doesn't fix anything that could be triggered - ext2_delete_entry()
can happen only if you've already done lookup. I.e. no problems had been
found in that block back when we were finding the entry.
c) makes ugly code uglier.
d) real fix exists and got a lot of testing over that last 5 months.

Folks, I think that directories-in-pagecache patch is worth applying in 2.4.
It is local to fs/ext2, it simplifies a lot of code and it got a decent
testing.

Variant against 2.4.5 is what I'm running right now (and it stayed unchanged
since early March). Patch is on ftp.math.psu.edu/pub/viro/ext2-dir-patch-S5.gz
Please, consider applying it.
Al

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/