Re: Thread stuck in aioprn

From: Kris Kennaway <kris_at_obsecurity.org>
Date: Mon, 20 Nov 2006 18:26:59 -0500
On Tue, Nov 21, 2006 at 07:21:35AM +0800, David Xu wrote:
> On Tuesday 21 November 2006 03:54, Kris Kennaway wrote:
> > On Fri, Oct 06, 2006 at 11:16:31AM +0800, David Xu wrote:
> > > On Friday 06 October 2006 08:14, Kris Kennaway wrote:
> > > > FYI, this has recurred, so it seems to be an easy problem to trigger.
> > > >
> > > > Kris
> > >
> > > can you try attached patch ? it disables support for non-disk files,
> > > I suspect the test passed non-disk file handle to aio, and caused
> > > the problem.
> > >
> > > David Xu
> >
> > This fix seems to work.
> >
> > Kris
> OK, so there are too choices, fix aio for all I/O facilities or disable aio
> for non-disk files, this will make daily usage safe.

I'm still not convinced it's not a more basic input validation error;
AFAIK the syscall test just inputs random data so it would be very
unlikely that this would magically construct itself into a legitimate
request but for a non-disk file.

i.e. fp->f_type != DTYPE_VNODE in the request (since it's random, this
is likely to be true), but the rest of the fp is garbage and is
causing something further on to hang instead of rejecting the garbage
data.

A good test would be to call with fp->f_type == DTYPE_VNODE and the
rest garbage and see if it still hangs.

Kris

Received on Mon Nov 20 2006 - 22:27:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:03 UTC