stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Dmitry Kasatkin <dmitry.kasatkin@huawei.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/1] integrity: prevent loading untrusted certificates to IMA trusted keyring
Date: Fri, 02 Oct 2015 13:39:25 -0400	[thread overview]
Message-ID: <1443807565.2503.68.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <fbc77b7587d515f17a8a7290daacd251064acbcb.1441911975.git.dmitry.kasatkin@huawei.com>

On Thu, 2015-09-10 at 22:06 +0300, Dmitry Kasatkin wrote:
> If IMA_LOAD_X509 is enabled either directly or indirectly via
> IMA_APPRAISE_SIGNED_INIT, it enables certificate loading to the IMA trusted
> keyring from the kernel. Due to the overlook, KEY_ALLOC_TRUSTED was used in the
> key_create_or_update() to create keys within the kernel, which caused
> overriding certificate verification result and allowed to load self-signed or
> wrongly signed certificates.
> 
> This patch just removes this option.

Thanks!

Mimi

> 
> Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@huawei.com>
> Cc:  <stable@vger.kernel.org> # 3.19+
> ---
>  security/integrity/digsig.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
> index 36fb6b5..5be9ffb 100644
> --- a/security/integrity/digsig.c
> +++ b/security/integrity/digsig.c
> @@ -105,7 +105,7 @@ int __init integrity_load_x509(const unsigned int id, const char *path)
>  				   rc,
>  				   ((KEY_POS_ALL & ~KEY_POS_SETATTR) |
>  				    KEY_USR_VIEW | KEY_USR_READ),
> -				   KEY_ALLOC_NOT_IN_QUOTA | KEY_ALLOC_TRUSTED);
> +				   KEY_ALLOC_NOT_IN_QUOTA);
>  	if (IS_ERR(key)) {
>  		rc = PTR_ERR(key);
>  		pr_err("Problem loading X.509 certificate (%d): %s\n",



      parent reply	other threads:[~2015-10-02 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 19:06 [PATCH 1/1] integrity: prevent loading untrusted certificates to IMA trusted keyring Dmitry Kasatkin
2015-09-23 20:08 ` Dmitry Kasatkin
2015-10-02 17:39 ` Mimi Zohar [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=1443807565.2503.68.camel@linux.vnet.ibm.com \
    --to=zohar@linux.vnet.ibm.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=dmitry.kasatkin@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).