lkml.org 
[lkml]   [2011]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] Compare namespaces when comparing addresses in auth_unix cache.
On 04/11/2011 08:57 AM, Alexey Dobriyan wrote:
> On Mon, Apr 11, 2011 at 4:36 PM, Serge E. Hallyn <serge@hallyn.com> wrote:
>
>> Besides use-after-free, the other concern is an invalid net_eq()
>> result due to the * being re-used for a new netns.
>
> Exactly.
>
> "struct net" dies last, no exceptions, anything different is a disaster.

Actually the patch turns out to be irrelevant because Pavel made the
whole thing into a pernet subsystem, so it was already fixed in a
different way. (Commit 2f72c9b7. My bad, I initially started working
against an NFS tree with an older kernel version, this fix was to a
different source file so my patch still applied, and I just regression
tested that it worked, not that it still failed without it. Just caught
it now.)

I actually did talk about addressing potential reuse of the net * in my
email with Stanislav (point of the patch was to allow one cache to
maintain two different contexts at the same time; a situation that
changed the meaning of an existing cache entry by requiring the old
context to go away didn't introduce any new problems that a single
context didn't already have due to DNAT, servers moving, administrators
changing credentials on the server). But sort of a moot point now.

I believe the third patch can be dropped entirely.

Rob


\
 
 \ /
  Last update: 2011-04-11 19:47    [W:0.033 / U:1.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site