mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, safford@watson.ibm.com,
	serue@linux.vnet.ibm.com, sailer@watson.ibm.com,
	zohar@us.ibm.com, Stephen Smalley <sds@tycho.nsa.gov>,
	CaseySchaufler <casey@schaufler-ca.com>
Subject: Re: [RFC][PATCH 3/4]integrity: Linux Integrity Module(LIM)
Date: Thu, 22 May 2008 12:08:55 +1000 (EST)	[thread overview]
Message-ID: <Xine.LNX.4.64.0805221203350.32056@us.intercode.com.au> (raw)
In-Reply-To: <1211385290.20922.27.camel@localhost.localdomain>

On Wed, 21 May 2008, Mimi Zohar wrote:

> +int register_template(char *template_name,
> +			struct template_operations *template_ops)
> +{
> +	int template_len;
> +	struct template_list_entry *entry;
> +
> +	if (!template_initialized++)
> +		INIT_LIST_HEAD(&integrity_templates);
> +
> +	entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
> +	INIT_LIST_HEAD(&entry->template);
> +
> +	template_len = strlen(template_name);
> +	if (template_len > TEMPLATE_NAME_LEN_MAX)
> +		template_len = TEMPLATE_NAME_LEN_MAX;
> +	memcpy(entry->template_name, template_name, template_len);
> +	entry->template_name[template_len] = '\0';
> +	entry->template_ops = template_ops;
> +	list_add(&entry->template, &integrity_templates);
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL_GPL(register_template);

There's no locking around the mainpulation of integrity_templates list.  
It seems that this could lead to list corruption.



- James
-- 
James Morris
<jmorris@namei.org>

      reply	other threads:[~2008-05-22  2:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21 15:54 Mimi Zohar
2008-05-22  2:08 ` James Morris [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=Xine.LNX.4.64.0805221203350.32056@us.intercode.com.au \
    --to=jmorris@namei.org \
    --cc=casey@schaufler-ca.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=safford@watson.ibm.com \
    --cc=sailer@watson.ibm.com \
    --cc=sds@tycho.nsa.gov \
    --cc=serue@linux.vnet.ibm.com \
    --cc=zohar@linux.vnet.ibm.com \
    --cc=zohar@us.ibm.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®