Re: khttpd and tmpfs don't get along?

Christoph Hellwig
2002-05-22T19:33:38Z

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.