Re: [PATCH 1/1] integrity: prevent loading untrusted certificates to IMA trusted keyring
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 > Cc: # 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", -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] integrity: prevent loading untrusted certificates to IMA trusted keyring
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> Cc: # 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", -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] integrity: prevent loading untrusted certificates to IMA trusted keyring
Hi, Apply this patch, please... Dmitry On Thu, Sep 10, 2015 at 10:06 PM, 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. > > Signed-off-by: Dmitry Kasatkin > Cc: # 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", > -- > 2.1.4 > -- Thanks, Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] integrity: prevent loading untrusted certificates to IMA trusted keyring
Hi, Apply this patch, please... Dmitry On Thu, Sep 10, 2015 at 10:06 PM, Dmitry Kasatkinwrote: > 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. > > Signed-off-by: Dmitry Kasatkin > Cc: # 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", > -- > 2.1.4 > -- Thanks, Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] integrity: prevent loading untrusted certificates to IMA trusted keyring
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. Signed-off-by: Dmitry Kasatkin Cc: # 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", -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] integrity: prevent loading untrusted certificates to IMA trusted keyring
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. Signed-off-by: Dmitry KasatkinCc: # 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", -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/