Hi Star,

On 10/16/18 04:41, Star Zeng wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=415
> 
> When SetVariable() to a time based auth variable with APPEND_WRITE
> attribute, and if the EFI_VARIABLE_AUTHENTICATION_2.TimeStamp in
> the input Data is earlier than current value, it will cause timestamp
> zeroing.
> 
> This issue may bring time based auth variable downgrade problem.
> For example:
> A vendor released three certs at 2014, 2015, and 2016, and system
> integrated the 2016 cert. User can SetVariable() with 2015 cert and
> APPEND_WRITE attribute to cause timestamp zeroing first, then
> SetVariable() with 2014 cert to downgrade the cert.
> 
> This patch fixes this issue.
> 
> Cc: Jiewen Yao <[email protected]>
> Cc: Chao Zhang <[email protected]>
> Cc: Jian J Wang <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <[email protected]>
> ---
>  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c 
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> index a2d61c8cd618..8e8db71bd201 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> @@ -2462,6 +2462,8 @@ UpdateVariable (
>          if (Variable->CurrPtr != NULL) {
>            if (VariableCompareTimeStampInternal 
> (&(((AUTHENTICATED_VARIABLE_HEADER *) CacheVariable->CurrPtr)->TimeStamp), 
> TimeStamp)) {
>              CopyMem (&AuthVariable->TimeStamp, TimeStamp, sizeof (EFI_TIME));
> +          } else {
> +            CopyMem (&AuthVariable->TimeStamp, 
> &(((AUTHENTICATED_VARIABLE_HEADER *) CacheVariable->CurrPtr)->TimeStamp), 
> sizeof (EFI_TIME));
>            }
>          }
>        }
> 

thank you for the BZ reference in the commit message.

The commit message is very good, and from it, I suspected this was a
security bug -- it makes "dbx" rollbacks possible, correct? --, and I
was wondering if it should have received a CVE.

Indeed, checking the TianoCore BZ, I can see that this patch mitigates
CVE-2018-3613.

I have requested earlier [1], and now I'm doing so again, that CVE fixes
please all mention the CVE number in the *subject line*. When people
look at the commit log, or even just patch traffic on this list, CVE
numbers should *jump* at them.

[email protected]">http://mid.mail-archive.com/[email protected]

Because you pushed this patch in ~25 hours after posting it to the
public list, and because TianoCore BZ#415 used to be a security bug
(restricted from mirroring to the bugzilla list, and opened up likely
most recently only), I couldn't comment on the subject line (I was on
PTO yesterday), and now we have another patch in the git history that is
a CVE fix, but states that fact nowhere at all.

To be clear, my complaint is not that the patch was pushed too quickly
(one day should be fine for CVEs after coordinated disclosure); my point
is that the patch was pushed quickly *and* it never mentioned it was a
CVE fix (in the subject line specifically).

In addition, while the bugzilla states:

> The issue is there since the auth variable driver was created in
> SecurityPkg, and it is inherited to current variable driver in
> MdeModulePkg after the auth variable driver in SecurityPkg was merged
> to variable driver in MdeModulePkg.

some specific commit references in the fix's commit message would have
helped, so that everyone could evaluate whether they were affected.

--*--

Process-wise, I'm sad that Red Hat -- and likely many other
organizations shipping edk2-based firmware -- have not been involved in
a coordinated disclosure around this issue. The timeline in

  https://bugzilla.tianocore.org/show_bug.cgi?id=415

suggests that there would have been a lot of time for this (and
apperently there was *intent* too). But here we are, caught with our
pants around our ankles.

Prasad, to my understanding, you are Red Hat's representative on the
TianoCore Bugzilla security group. I've now searched the RH Bugzilla for
"CVE-2018-3613", and there are no hits. Can you please confirm whether
this BZ was made available to us (and we missed it, and/or failed to act
upon it otherwise)?

Either way, please:

- Create the appropriate tracker in the Red Hat Bugzilla. (The patch has
  been picked to UDK as far back as UDK2015; we obviously need to fix
  this yesterday.)

- Forward the issue to <https://seclists.org/oss-sec/>, so that other
  organizations that distribute OVMF learn of this.

(I'm adding a few direct CC's now, but that list shouldn't be limited by
my imagination. I've briefly searched the oss-sec archive as well: also
no hits.)

Thank you,
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to