linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Jarkko Sakkinen" <jarkko@kernel.org>, <linux-integrity@vger.kernel.org>
Cc: "James Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Mimi Zohar" <zohar@linux.ibm.com>,
	"David Howells" <dhowells@redhat.com>,
	"Paul Moore" <paul@paul-moore.com>,
	"James Morris" <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>, <keyrings@vger.kernel.org>,
	<linux-security-module@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tpm: validate object type in tpm2_handle_mso()
Date: Sun, 07 Jul 2024 13:14:53 +0300	[thread overview]
Message-ID: <D2J87W3IAN9S.2IDDGG803SS58@kernel.org> (raw)
In-Reply-To: <20240707010916.78918-1-jarkko@kernel.org>

On Sun Jul 7, 2024 at 4:09 AM EEST, Jarkko Sakkinen wrote:
> tpm2_handle_mso() lacks validation for the object type. Validate that
> value is one of the allowed values in order to detect errors.
>
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> ---

Just something I spotted while fixing the other bug.

If an API that claims to return enum, the results would
better *only* be values from that enum.

Also this API is using alien acronym "MSO" for the enum
fields while the spec uses "HT".

BR, Jarkko


      reply	other threads:[~2024-07-07 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-07  1:09 [PATCH] tpm: validate object type in tpm2_handle_mso() Jarkko Sakkinen
2024-07-07 10:14 ` Jarkko Sakkinen [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=D2J87W3IAN9S.2IDDGG803SS58@kernel.org \
    --to=jarkko@kernel.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dhowells@redhat.com \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    --cc=zohar@linux.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;
as well as URLs for NNTP newsgroup(s).