[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081028.220647.161635128.davem@davemloft.net>
Date: Tue, 28 Oct 2008 22:06:47 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: fernando@....ntt.co.jp
Cc: netdev@...r.kernel.org
Subject: Re: [RFC][PATCH] xfrm: do not leak ESRCH to user space
From: Fernando Luis Vázquez Cao <fernando@....ntt.co.jp>
Date: Wed, 29 Oct 2008 11:58:23 +0900
> On Tue, 2008-10-28 at 15:58 -0700, David Miller wrote:
> > From: Fernando Luis Vázquez Cao <fernando@....ntt.co.jp>
> > Date: Fri, 24 Oct 2008 10:05:00 +0900
> >
> > > Looking at the code, the window during which an entry is in
> > > XFRM_STATE_EXPIRED state seems to be about 2 seconds in the worst case.
> > > Connection attempts before and after that window would most likely
> > > result in a successful connection or -EAGAIN, respectively. Would not it
> > > make sense to return -EAGAIN also during that 2 seconds window?
> >
> > Only if an acquire has been triggered and is in progress, which as
> > explained above the code already seems to handle.
> As explained above that does not seem to be the case.
>
> Besides, there is also the case that km_query() in xfrm_state_find()
> fails in which we would leak -ESRCH to user space too. As mentioned in a
> previous email, returning -EAGAIN is arguably more appropriate if the
> cause of km_query failing was that racoon's receive buffer was full
> (could happen under heavy load), because as racoon reads from it the
> problem will go away.
Good points, I'll think about this some more.
Thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists