[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6503.1236726067@redhat.com>
Date: Tue, 10 Mar 2009 23:01:07 +0000
From: David Howells <dhowells@...hat.com>
To: Hugh Dickins <hugh@...itas.com>
Cc: dhowells@...hat.com, jmalicki@...acarta.com, chrisw@...s-sol.org,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH] CRED: Fix check_unsafe_exec()
Hugh Dickins <hugh@...itas.com> wrote:
> Surely we'd prefer to avoid the overhead of additional confusing
> counts if they can be avoided?
As long as they are properly commented, it shouldn't be too confusing.
> We already have what I think is a satisfactory patch for the struct fs
> part of it:
We do?
> /proc can easily manage root and pwd while holding the lock
> instead of raising fs->count.
I'm assume you mean by extending the time we hold task->alloc_lock until we've
completed the path_get().
> I don't understand why check_unsafe_exec() needs to check
> current->files->count at all, since do_execve() has already
> done an unshare_files() to get its own copy - and proceeds with
> that one if the exec succeeds.
>
> My belief is that the files->count check could/should have been
> removed when that unshare_files() was put in. Please explain why
> I'm wrong on that - I can quite accept that I'm muddled about it,
> but please do explain it to me.
It seems you're right about that. I think someone else on the security list
probably needs to answer that.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists