Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1290636 > unrolled thread
| Started by | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| First post | 2015-12-13 16:50 +0100 |
| Last post | 2015-12-14 16:00 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2 0/3] TPM 2.0 trusted key features for v4.5 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-12-13 16:50 +0100
[PATCH v2 1/3] keys, trusted: fix: *do not* allow duplicate key options Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-12-13 16:50 +0100
Re: [PATCH v2 1/3] keys, trusted: fix: *do not* allow duplicate key options Mimi Zohar <zohar@linux.vnet.ibm.com> - 2015-12-14 14:50 +0100
Re: [PATCH v2 1/3] keys, trusted: fix: *do not* allow duplicate key options Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-12-14 16:00 +0100
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2015-12-13 16:50 +0100 |
| Subject | [PATCH v2 0/3] TPM 2.0 trusted key features for v4.5 |
| Message-ID | <qFh4l-1L3-3@gated-at.bofh.it> |
These are the remaining features to enable trusted keys for TPM 2.0 that were not finished by the v4.4 merge window. These patches enable authorization policy based sealing (like using PCRs together with a password for example or something more complicated) with a user selected hash algorithm. Jarkko Sakkinen (3): keys, trusted: fix: *do not* allow duplicate key options keys, trusted: select hash algorithm for TPM2 chips keys, trusted: seal with a TPM2 authorization policy Documentation/security/keys-trusted-encrypted.txt | 31 +++++++----- crypto/hash_info.c | 2 + drivers/char/tpm/tpm.h | 10 ++-- drivers/char/tpm/tpm2-cmd.c | 60 ++++++++++++++++++++--- include/crypto/hash_info.h | 3 ++ include/keys/trusted-type.h | 5 ++ include/uapi/linux/hash_info.h | 1 + security/keys/Kconfig | 1 + security/keys/trusted.c | 56 ++++++++++++++++++++- 9 files changed, 147 insertions(+), 22 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2015-12-13 16:50 +0100 |
| Subject | [PATCH v2 1/3] keys, trusted: fix: *do not* allow duplicate key options |
| Message-ID | <qFh4l-1L3-11@gated-at.bofh.it> |
| In reply to | #1290636 |
The trusted keys option parsing allows specifying the same option
multiple times. The last option value specified is used.
This can be seen as a regression because:
* No gain.
* Could be problematic if there is be options dependent on other
options.
Reported-by: James Morris James Morris <jmorris@namei.org>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
security/keys/trusted.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/security/keys/trusted.c b/security/keys/trusted.c
index 903dace..7c183c7 100644
--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -736,11 +736,14 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
int res;
unsigned long handle;
unsigned long lock;
+ unsigned long token_mask = 0;
while ((p = strsep(&c, " \t"))) {
if (*p == '\0' || *p == ' ' || *p == '\t')
continue;
token = match_token(p, key_tokens, args);
+ if (test_and_set_bit(token, &token_mask))
+ return -EINVAL;
switch (token) {
case Opt_pcrinfo:
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Mimi Zohar <zohar@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-12-14 14:50 +0100 |
| Subject | Re: [PATCH v2 1/3] keys, trusted: fix: *do not* allow duplicate key options |
| Message-ID | <qFBFM-6PR-1@gated-at.bofh.it> |
| In reply to | #1290637 |
On Sun, 2015-12-13 at 17:42 +0200, Jarkko Sakkinen wrote:
> The trusted keys option parsing allows specifying the same option
> multiple times. The last option value specified is used.
>
> This can be seen as a regression because:
>
> * No gain.
> * Could be problematic if there is be options dependent on other
> options.
Thanks, Jarkko. Although it should be obvious that patch limits the
number of times an option can be specified, you should explicitly
mention it in the patch description.
Mimi
> Reported-by: James Morris James Morris <jmorris@namei.org>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> ---
> security/keys/trusted.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/security/keys/trusted.c b/security/keys/trusted.c
> index 903dace..7c183c7 100644
> --- a/security/keys/trusted.c
> +++ b/security/keys/trusted.c
> @@ -736,11 +736,14 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
> int res;
> unsigned long handle;
> unsigned long lock;
> + unsigned long token_mask = 0;
>
> while ((p = strsep(&c, " \t"))) {
> if (*p == '\0' || *p == ' ' || *p == '\t')
> continue;
> token = match_token(p, key_tokens, args);
> + if (test_and_set_bit(token, &token_mask))
> + return -EINVAL;
>
> switch (token) {
> case Opt_pcrinfo:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2015-12-14 16:00 +0100 |
| Subject | Re: [PATCH v2 1/3] keys, trusted: fix: *do not* allow duplicate key options |
| Message-ID | <qFCLw-7vq-15@gated-at.bofh.it> |
| In reply to | #1291193 |
On Mon, Dec 14, 2015 at 08:46:33AM -0500, Mimi Zohar wrote:
> On Sun, 2015-12-13 at 17:42 +0200, Jarkko Sakkinen wrote:
> > The trusted keys option parsing allows specifying the same option
> > multiple times. The last option value specified is used.
> >
> > This can be seen as a regression because:
> >
> > * No gain.
> > * Could be problematic if there is be options dependent on other
> > options.
>
> Thanks, Jarkko. Although it should be obvious that patch limits the
> number of times an option can be specified, you should explicitly
> mention it in the patch description.
OK, I'll update the commit message with this information before I send
the pull request. Thanks for the advice!
> Mimi
/Jarkko
>
> > Reported-by: James Morris James Morris <jmorris@namei.org>
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > ---
> > security/keys/trusted.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/security/keys/trusted.c b/security/keys/trusted.c
> > index 903dace..7c183c7 100644
> > --- a/security/keys/trusted.c
> > +++ b/security/keys/trusted.c
> > @@ -736,11 +736,14 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
> > int res;
> > unsigned long handle;
> > unsigned long lock;
> > + unsigned long token_mask = 0;
> >
> > while ((p = strsep(&c, " \t"))) {
> > if (*p == '\0' || *p == ' ' || *p == '\t')
> > continue;
> > token = match_token(p, key_tokens, args);
> > + if (test_and_set_bit(token, &token_mask))
> > + return -EINVAL;
> >
> > switch (token) {
> > case Opt_pcrinfo:
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web