Re: khttpd and tmpfs don't get along?

Christoph Hellwig (hch@infradead.org)
Wed, 22 May 2002 20:33:28 +0100


On Wed, May 22, 2002 at 12:20:55PM -0700, Dan Kegel wrote:
> I just now crashed Red Hat 7.3 on x86 SMP by compiling in khttpd
> and serving files out of a tmpfs. It crashed with or without my
> earlier patch (http://www.kegel.com/linux/khttpd/khttpd-unbork.patch)
> that fixes khttpd crashes with other filesystems.
> Guess it wasn't a bug in linuxppc_2_4_devel after all.

I doubt it. the use of do_generic_file_read outside of code the filesystem
has selected to use (i.e. generic methods) is FUNDAMENTALLY broken.

Some time ago I though I found a similar bug in XFS, but Steve Lord says
it's not exploitable in real world (XFS uses the generic methods with
additional locking around it).

The only sane soloution is to get rid of that abuse in khttpd, loop and
sys_sendfile.

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