From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, stefanb@linux.ibm.com, "Gao,
Zhichao" <zhichao.gao@intel.com>
Cc: "Terry Lee" <terry.lee@hpe.com>,
"Yao, Jiewen" <jiewen.yao@intel.com>,
"Wang, Jian J" <jian.j.wang@intel.com>,
"Zhang, Chao B" <chao.b.zhang@intel.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [edk2-devel] [PATCH] SecurityPkg/Tcg2PhysicalPresenceLib: Fix incorrect TCG VER comparision
Date: Mon, 13 Jul 2020 16:38:37 +0200 [thread overview]
Message-ID: <52fec53b-53d4-3a9e-dc3d-d8e919cd8b73@redhat.com> (raw)
In-Reply-To: <6db37279-ddd0-4adf-6439-403ac90dd1e9@linux.ibm.com>
On 07/10/20 16:27, Stefan Berger wrote:
> On 7/10/20 9:53 AM, Stefan Berger wrote:
>> On 7/10/20 1:43 AM, Laszlo Ersek wrote:
>>> (+Marc-André, Stefan)
>>>
>>> On 07/10/20 02:44, Gao, Zhichao wrote:
>>>> This bug is not obeserved by me. But I view the code. The condition
>>>> is incorrect and it would affect the TCG operation:
>>>> if (!mIsTcg2PPVerLowerThan_1_3) {
>>>> if (OperationRequest <
>>>> TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
>>>> //
>>>> // TCG2 PP1.3 spec defined operations that are reserved
>>>> or un-implemented
>>>> //
>>>> return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
>>>> }
>>>> } else {
>>>> //
>>>> // TCG PP lower than 1.3. (1.0, 1.1, 1.2)
>>>> //
>>>> if (OperationRequest <= TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX) {
>>>> RequestConfirmed = TRUE;
>>>> } else if (OperationRequest <
>>>> TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
>>>> return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
>>>> }
>>>> }
>>>>
>>> I've found that code myself, but I'm not familiar enough with TPM PPI
>>> stuff to understand immediately the effects of this change. I can see
>>> that where we used to return
>>> TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED before, we could now assign
>>> "RequestConfirmed = TRUE", and vice versa, due to
>>> "mIsTcg2PPVerLowerThan_1_3" being potentially inverted.
>>>
>>> But what does that *mean*? What is the behavioral change that human
>>> end-users, or software components, will experience?
>>
>>
>> The above code snipped is located in a default branch of a large
>> switch statement that handles most of the common PPI operations
>> independent of this change, so that at least is good.
>>
>> I would say that in the worst case some of the operations not
>> otherwise handled may have mistakenly failed or could have been
>> executed without user confirmation/interaction. On Linux at least PPI
>> requests can only be sent by root.
>
>
> I am running a somewhat dated version of edk2 (Fedora 31). The
> operations advertised are: 0,5,14,21,22,23,24,33,96,97. All of these are
> individually handled in the switch statement, so there should no be any
> impact. I am currently not aware of whether this list can be extended
> with some sort of module.
Thank you!
Laszlo
next prev parent reply other threads:[~2020-07-13 14:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 2:46 [PATCH] SecurityPkg/Tcg2PhysicalPresenceLib: Fix incorrect TCG VER comparision Gao, Zhichao
2020-07-09 10:02 ` [edk2-devel] " Laszlo Ersek
2020-07-10 0:44 ` Gao, Zhichao
2020-07-10 5:43 ` Laszlo Ersek
2020-07-10 13:53 ` Stefan Berger
[not found] ` <1620688EE0DC3449.7755@groups.io>
2020-07-10 14:27 ` Stefan Berger
2020-07-13 14:38 ` Laszlo Ersek [this message]
2020-10-15 16:58 ` Lee, Terry
2020-10-16 1:09 ` Yao, Jiewen
2020-10-16 2:25 ` Lee, Terry
2020-10-16 2:30 ` Yao, Jiewen
2020-10-16 5:32 ` Lee, Terry
2020-10-16 5:54 ` Yao, Jiewen
[not found] ` <163E634CB21B8196.31077@groups.io>
2020-10-18 1:18 ` Yao, Jiewen
2020-10-19 15:39 ` Laszlo Ersek
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-list 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=52fec53b-53d4-3a9e-dc3d-d8e919cd8b73@redhat.com \
--to=devel@edk2.groups.io \
/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