From: David Howells <dhowells@redhat.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org,
James Morris <james.l.morris@oracle.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
keyrings@linux-nfs.org (open list:KEYS/KEYRINGS:),
linux-security-module@vger.kernel.org (open list:SECURITY
SUBSYSTEM)
Subject: Re: [PATCH] KEYS: close race between key lookup and freeing
Date: Mon, 05 Jan 2015 15:59:48 +0000 [thread overview]
Message-ID: <30932.1420473588@warthog.procyon.org.uk> (raw)
In-Reply-To: <1419863941-16403-1-git-send-email-sasha.levin@oracle.com>
Sasha Levin <sasha.levin@oracle.com> wrote:
> When a key is being garbage collected, it's key->user would get put before
> the ->destroy() callback is called, where the key is removed from it's
> respective tracking structures.
>
> This leaves a key hanging in a semi-invalid state which leaves a window open
> for a different task to try an access key->user. An example is
> find_keyring_by_name() which would dereference key->user for a key that is
> in the process of being garbage collected (where key->user was freed but
> ->destroy() wasn't called yet - so it's still present in the linked list).
>
> This would cause either a panic, or corrupt memory.
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Applied.
prev parent reply other threads:[~2015-01-05 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-29 14:39 Sasha Levin
2015-01-05 15:59 ` David Howells [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30932.1420473588@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=james.l.morris@oracle.com \
--cc=keyrings@linux-nfs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sasha.levin@oracle.com \
--cc=serge@hallyn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®